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_PASSTHROUGHFS_PASSTHROUGH_FS_H_ | 5 #ifndef LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_ |
6 #define LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_ | 6 #define LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_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 PassthroughFs : public Filesystem { | 13 class PassthroughFs : public Filesystem { |
14 protected: | 14 protected: |
15 PassthroughFs(); | 15 PassthroughFs(); |
16 | 16 |
17 virtual Error Init(const FsInitArgs& args); | 17 virtual Error Init(const FsInitArgs& args); |
18 virtual void Destroy(); | 18 virtual void Destroy(); |
19 | 19 |
20 public: | 20 public: |
21 virtual Error Open(const Path& path, int mode, ScopedNode* out_node); | 21 virtual Error OpenWithMode(const Path& path, int open_flags, mode_t mode, |
| 22 ScopedNode* out_node); |
22 virtual Error OpenResource(const Path& path, ScopedNode* out_node); | 23 virtual Error OpenResource(const Path& path, ScopedNode* out_node); |
23 virtual Error Unlink(const Path& path); | 24 virtual Error Unlink(const Path& path); |
24 virtual Error Mkdir(const Path& path, int perm); | 25 virtual Error Mkdir(const Path& path, int perm); |
25 virtual Error Rmdir(const Path& path); | 26 virtual Error Rmdir(const Path& path); |
26 virtual Error Remove(const Path& path); | 27 virtual Error Remove(const Path& path); |
27 virtual Error Rename(const Path& path, const Path& newpath); | 28 virtual Error Rename(const Path& path, const Path& newpath); |
28 | 29 |
29 private: | 30 private: |
30 friend class TypedFsFactory<PassthroughFs>; | 31 friend class TypedFsFactory<PassthroughFs>; |
31 DISALLOW_COPY_AND_ASSIGN(PassthroughFs); | 32 DISALLOW_COPY_AND_ASSIGN(PassthroughFs); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace nacl_io | 35 } // namespace nacl_io |
35 | 36 |
36 #endif // LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_ | 37 #endif // LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_ |
OLD | NEW |