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