1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef LIBRARIES_NACL_IO_DEVFS_DEV_FS_H_ 6 #define LIBRARIES_NACL_IO_DEVFS_DEV_FS_H_ 7 8 #include "nacl_io/filesystem.h" 9 #include "nacl_io/typed_fs_factory.h" 10 11 namespace nacl_io { 12 13 class DevFs : public Filesystem { 14 public: 15 virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode, 16 ScopedNode* out_node); 17 virtual Error Unlink(const Path& path); 18 virtual Error Mkdir(const Path& path, int permissions); 19 virtual Error Rmdir(const Path& path); 20 virtual Error Remove(const Path& path); 21 virtual Error Rename(const Path& path, const Path& newpath); 22 23 Error CreateFsNode(Filesystem* fs); 24 Error DestroyFsNode(Filesystem* fs); 25 26 protected: 27 DevFs(); 28 29 virtual Error Init(const FsInitArgs& args); 30 31 private: 32 ScopedNode root_; 33 ScopedNode fs_dir_; 34 35 friend class TypedFsFactory<DevFs>; 36 DISALLOW_COPY_AND_ASSIGN(DevFs); 37 }; 38 39 } // namespace nacl_io 40 41 #endif // LIBRARIES_NACL_IO_DEVFS_DEV_FS_H_ 42