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