OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual base::File::Error Truncate( | 120 virtual base::File::Error Truncate( |
121 FileSystemOperationContext* context, | 121 FileSystemOperationContext* context, |
122 const FileSystemURL& url, | 122 const FileSystemURL& url, |
123 int64 length) = 0; | 123 int64 length) = 0; |
124 | 124 |
125 // Copies or moves a single file from |src_url| to |dest_url|. | 125 // Copies or moves a single file from |src_url| to |dest_url|. |
126 // The filesystem type of |src_url| and |dest_url| MUST be same. | 126 // The filesystem type of |src_url| and |dest_url| MUST be same. |
127 // For |option|, please see file_system_operation.h | 127 // For |option|, please see file_system_operation.h |
128 // | 128 // |
129 // This returns: | 129 // This returns: |
130 // - PLATFORM_FILE_ERROR_NOT_FOUND if |src_url| | 130 // - File::FILE_ERROR_NOT_FOUND if |src_url| |
131 // or the parent directory of |dest_url| does not exist. | 131 // or the parent directory of |dest_url| does not exist. |
132 // - PLATFORM_FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file. | 132 // - File::FILE_ERROR_NOT_A_FILE if |src_url| exists but is not a file. |
133 // - PLATFORM_FILE_ERROR_INVALID_OPERATION if |dest_url| exists and | 133 // - File::FILE_ERROR_INVALID_OPERATION if |dest_url| exists and |
134 // is not a file. | 134 // is not a file. |
135 // - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and | 135 // - File::FILE_ERROR_FAILED if |dest_url| does not exist and |
136 // its parent path is a file. | 136 // its parent path is a file. |
137 // | 137 // |
138 virtual base::File::Error CopyOrMoveFile( | 138 virtual base::File::Error CopyOrMoveFile( |
139 FileSystemOperationContext* context, | 139 FileSystemOperationContext* context, |
140 const FileSystemURL& src_url, | 140 const FileSystemURL& src_url, |
141 const FileSystemURL& dest_url, | 141 const FileSystemURL& dest_url, |
142 CopyOrMoveOption option, | 142 CopyOrMoveOption option, |
143 bool copy) = 0; | 143 bool copy) = 0; |
144 | 144 |
145 // Copies in a single file from a different filesystem. | 145 // Copies in a single file from a different filesystem. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 protected: | 177 protected: |
178 FileSystemFileUtil() {} | 178 FileSystemFileUtil() {} |
179 | 179 |
180 private: | 180 private: |
181 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); | 181 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); |
182 }; | 182 }; |
183 | 183 |
184 } // namespace fileapi | 184 } // namespace fileapi |
185 | 185 |
186 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 186 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
OLD | NEW |