OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SYSTEM_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // If the file hasn't existed but it couldn't be created for some other | 61 // If the file hasn't existed but it couldn't be created for some other |
62 // reasons, |created| is set false and |error code| indicates the error. | 62 // reasons, |created| is set false and |error code| indicates the error. |
63 virtual PlatformFileError EnsureFileExists( | 63 virtual PlatformFileError EnsureFileExists( |
64 FileSystemOperationContext* context, | 64 FileSystemOperationContext* context, |
65 const FilePath& file_path, bool* created); | 65 const FilePath& file_path, bool* created); |
66 | 66 |
67 // Retrieves the information about a file. It is invalid to pass NULL for the | 67 // Retrieves the information about a file. It is invalid to pass NULL for the |
68 // callback. | 68 // callback. |
69 virtual PlatformFileError GetFileInfo( | 69 virtual PlatformFileError GetFileInfo( |
70 FileSystemOperationContext* context, | 70 FileSystemOperationContext* context, |
71 const FilePath& file_, base::PlatformFileInfo* file_info); | 71 const FilePath& file_, |
| 72 base::PlatformFileInfo* file_info, |
| 73 FilePath* platform_path); |
72 | 74 |
73 virtual PlatformFileError ReadDirectory( | 75 virtual PlatformFileError ReadDirectory( |
74 FileSystemOperationContext* context, | 76 FileSystemOperationContext* context, |
75 const FilePath& file_path, | 77 const FilePath& file_path, |
76 std::vector<base::FileUtilProxy::Entry>* entries); | 78 std::vector<base::FileUtilProxy::Entry>* entries); |
77 | 79 |
78 // Creates directory at given path. It's an error to create | 80 // Creates directory at given path. It's an error to create |
79 // if |exclusive| is true and dir already exists. | 81 // if |exclusive| is true and dir already exists. |
80 virtual PlatformFileError CreateDirectory( | 82 virtual PlatformFileError CreateDirectory( |
81 FileSystemOperationContext* context, | 83 FileSystemOperationContext* context, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 FileSystemOperationContext* unused, | 150 FileSystemOperationContext* unused, |
149 const FilePath& file_path); | 151 const FilePath& file_path); |
150 | 152 |
151 friend struct DefaultSingletonTraits<FileSystemFileUtil>; | 153 friend struct DefaultSingletonTraits<FileSystemFileUtil>; |
152 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); | 154 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil); |
153 }; | 155 }; |
154 | 156 |
155 } // namespace fileapi | 157 } // namespace fileapi |
156 | 158 |
157 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ | 159 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_ |
OLD | NEW |