OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // Requests reading a file previously opened with |file_handle|. The callback | 93 // Requests reading a file previously opened with |file_handle|. The callback |
94 // can be called multiple times until |has_more| is set to false. On success | 94 // can be called multiple times until |has_more| is set to false. On success |
95 // it should return |length| bytes starting from |offset| in total. It can | 95 // it should return |length| bytes starting from |offset| in total. It can |
96 // return less only in case EOF is encountered. | 96 // return less only in case EOF is encountered. |
97 virtual void ReadFile(int file_handle, | 97 virtual void ReadFile(int file_handle, |
98 net::IOBuffer* buffer, | 98 net::IOBuffer* buffer, |
99 int64 offset, | 99 int64 offset, |
100 int length, | 100 int length, |
101 const ReadChunkReceivedCallback& callback) = 0; | 101 const ReadChunkReceivedCallback& callback) = 0; |
102 | 102 |
| 103 // Requests creating a directory. If |recursive| is passed, then all non |
| 104 // existing directories on the path will be created. If |exclusive| is true, |
| 105 // then creating the directory will fail, if it already exists. |
| 106 virtual void CreateDirectory( |
| 107 const base::FilePath& directory_path, |
| 108 bool exclusive, |
| 109 bool recursive, |
| 110 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; |
| 111 |
103 // Returns a provided file system info for this file system. | 112 // Returns a provided file system info for this file system. |
104 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; | 113 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; |
105 | 114 |
106 // Returns a request manager for the file system. | 115 // Returns a request manager for the file system. |
107 virtual RequestManager* GetRequestManager() = 0; | 116 virtual RequestManager* GetRequestManager() = 0; |
108 | 117 |
109 // Returns a weak pointer to this object. | 118 // Returns a weak pointer to this object. |
110 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; | 119 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; |
111 }; | 120 }; |
112 | 121 |
113 } // namespace file_system_provider | 122 } // namespace file_system_provider |
114 } // namespace chromeos | 123 } // namespace chromeos |
115 | 124 |
116 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 125 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
OLD | NEW |