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_FILEAPI_FILE_UTIL_HELPER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_UTIL_HELPER_H_ |
6 #define WEBKIT_FILEAPI_FILE_UTIL_HELPER_H_ | 6 #define WEBKIT_FILEAPI_FILE_UTIL_HELPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "webkit/fileapi/fileapi_export.h" | 12 #include "webkit/fileapi/fileapi_export.h" |
13 | 13 |
14 namespace fileapi { | 14 namespace fileapi { |
15 | 15 |
16 class FileSystemFileUtil; | 16 class FileSystemFileUtil; |
17 class FileSystemOperationContext; | 17 class FileSystemOperationContext; |
18 class FileSystemURL; | 18 class FileSystemURL; |
19 | 19 |
20 // A collection of static methods that are usually called by | 20 // A collection of static methods that are usually called by |
21 // FileSystemFileUtilProxy. The method should be called on FILE thread. | 21 // FileSystemFileUtilProxy. The method should be called on FILE thread. |
22 class FILEAPI_EXPORT_PRIVATE FileUtilHelper { | 22 class FILEAPI_EXPORT_PRIVATE FileUtilHelper { |
23 public: | 23 public: |
| 24 static bool PathExists( |
| 25 FileSystemOperationContext* context, |
| 26 FileSystemFileUtil* file_util, |
| 27 const FileSystemURL& url); |
| 28 |
| 29 static bool DirectoryExists( |
| 30 FileSystemOperationContext* context, |
| 31 FileSystemFileUtil* file_util, |
| 32 const FileSystemURL& url); |
| 33 |
24 static base::PlatformFileError Copy( | 34 static base::PlatformFileError Copy( |
25 FileSystemOperationContext* context, | 35 FileSystemOperationContext* context, |
26 FileSystemFileUtil* src_file_util, | 36 FileSystemFileUtil* src_file_util, |
27 FileSystemFileUtil* dest_file_utile, | 37 FileSystemFileUtil* dest_file_utile, |
28 const FileSystemURL& src_root_url, | 38 const FileSystemURL& src_root_url, |
29 const FileSystemURL& dest_root_url); | 39 const FileSystemURL& dest_root_url); |
30 | 40 |
31 static base::PlatformFileError Move( | 41 static base::PlatformFileError Move( |
32 FileSystemOperationContext* context, | 42 FileSystemOperationContext* context, |
33 FileSystemFileUtil* src_file_util, | 43 FileSystemFileUtil* src_file_util, |
(...skipping 16 matching lines...) Expand all Loading... |
50 private: | 60 private: |
51 static base::PlatformFileError DeleteDirectoryRecursive( | 61 static base::PlatformFileError DeleteDirectoryRecursive( |
52 FileSystemOperationContext* context, | 62 FileSystemOperationContext* context, |
53 FileSystemFileUtil* file_util, | 63 FileSystemFileUtil* file_util, |
54 const FileSystemURL& url); | 64 const FileSystemURL& url); |
55 }; | 65 }; |
56 | 66 |
57 } // namespace fileapi | 67 } // namespace fileapi |
58 | 68 |
59 #endif // WEBKIT_FILEAPI_FILE_UTIL_HELPER_H_ | 69 #endif // WEBKIT_FILEAPI_FILE_UTIL_HELPER_H_ |
OLD | NEW |