Home | History | Annotate | Download | only in passthroughfs
      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_PASSTHROUGHFS_PASSTHROUGH_FS_H_
      6 
      7 #define LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_
      8 
      9 #include "nacl_io/filesystem.h"
     10 #include "nacl_io/typed_fs_factory.h"
     11 
     12 namespace nacl_io {
     13 
     14 class PassthroughFs : public Filesystem {
     15  protected:
     16   PassthroughFs();
     17 
     18   virtual Error Init(const FsInitArgs& args);
     19   virtual void Destroy();
     20 
     21  public:
     22   virtual Error Access(const Path& path, int a_mode);
     23   virtual Error Open(const Path& path, int mode, ScopedNode* out_node);
     24   virtual Error OpenResource(const Path& path, ScopedNode* out_node);
     25   virtual Error Unlink(const Path& path);
     26   virtual Error Mkdir(const Path& path, int perm);
     27   virtual Error Rmdir(const Path& path);
     28   virtual Error Remove(const Path& path);
     29   virtual Error Rename(const Path& path, const Path& newpath);
     30 
     31  private:
     32   friend class TypedFsFactory<PassthroughFs>;
     33   DISALLOW_COPY_AND_ASSIGN(PassthroughFs);
     34 };
     35 
     36 }  // namespace nacl_io
     37 
     38 #endif  // LIBRARIES_NACL_IO_PASSTHROUGHFS_PASSTHROUGH_FS_H_
     39