OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 #include "ppapi/c/pp_instance.h" |
| 6 |
| 7 #include "nacl_io/filesystem.h" |
| 8 #include "nacl_io/typed_fs_factory.h" |
| 9 |
| 10 namespace nacl_io { |
| 11 |
| 12 class GoogleDriveFs : public Filesystem { |
| 13 protected: |
| 14 GoogleDriveFs(); |
| 15 virtual ~GoogleDriveFs(); |
| 16 |
| 17 Error Init(const FsInitArgs& args); |
| 18 void Destroy(); |
| 19 |
| 20 public: |
| 21 Error OpenWithMode(const Path& path, |
| 22 int open_flags, |
| 23 mode_t mode, |
| 24 ScopedNode* out_node); |
| 25 Error Unlink(const Path& path); |
| 26 Error Mkdir(const Path& path, int permissions); |
| 27 Error Rmdir(const Path& path); |
| 28 Error Remove(const Path& path); |
| 29 Error Rename(const Path& path, const Path& newPath); |
| 30 |
| 31 std::string token(); |
| 32 PP_Instance instance(); |
| 33 |
| 34 private: |
| 35 Error IsEmpty(const std::string& dir_id, bool* out_is_empty_dir); |
| 36 |
| 37 PP_Instance instance_; |
| 38 std::string token_; |
| 39 |
| 40 friend class TypedFsFactory<GoogleDriveFs>; |
| 41 }; |
| 42 |
| 43 } // namespace nacl_io |
OLD | NEW |