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_NATIVE_FILE_UTIL_H_ | 5 #ifndef WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_ |
6 #define WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_ | 6 #define WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| 11 #include "webkit/fileapi/fileapi_export.h" |
11 #include "webkit/fileapi/file_system_file_util.h" | 12 #include "webkit/fileapi/file_system_file_util.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class Time; | 15 class Time; |
15 } | 16 } |
16 | 17 |
17 namespace fileapi { | 18 namespace fileapi { |
18 | 19 |
19 using base::PlatformFile; | 20 using base::PlatformFile; |
20 using base::PlatformFileError; | 21 using base::PlatformFileError; |
21 | 22 |
22 // TODO(dmikurube): Add unit tests for NativeFileUtil. | 23 // TODO(dmikurube): Add unit tests for NativeFileUtil. |
23 // This class handles accessing the OS native filesystem. | 24 // This class handles accessing the OS native filesystem. |
24 class NativeFileUtil { | 25 class FILEAPI_EXPORT_PRIVATE NativeFileUtil { |
25 public: | 26 public: |
26 static PlatformFileError CreateOrOpen( | 27 static PlatformFileError CreateOrOpen( |
27 const FilePath& path, | 28 const FilePath& path, |
28 int file_flags, | 29 int file_flags, |
29 PlatformFile* file_handle, | 30 PlatformFile* file_handle, |
30 bool* created); | 31 bool* created); |
31 static PlatformFileError Close(PlatformFile file); | 32 static PlatformFileError Close(PlatformFile file); |
32 static PlatformFileError EnsureFileExists(const FilePath& path, | 33 static PlatformFileError EnsureFileExists(const FilePath& path, |
33 bool* created); | 34 bool* created); |
34 static PlatformFileError CreateDirectory(const FilePath& path, | 35 static PlatformFileError CreateDirectory(const FilePath& path, |
(...skipping 17 matching lines...) Expand all Loading... |
52 static PlatformFileError DeleteFile(const FilePath& path); | 53 static PlatformFileError DeleteFile(const FilePath& path); |
53 static PlatformFileError DeleteSingleDirectory(const FilePath& path); | 54 static PlatformFileError DeleteSingleDirectory(const FilePath& path); |
54 | 55 |
55 private: | 56 private: |
56 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil); | 57 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace fileapi | 60 } // namespace fileapi |
60 | 61 |
61 #endif // WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_ | 62 #endif // WEBKIT_FILEAPI_NATIVE_FILE_UTIL_H_ |
OLD | NEW |