| 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_NATIVE_FILE_UTIL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_NATIVE_FILE_UTIL_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_NATIVE_FILE_UTIL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_NATIVE_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/files/file_util_proxy.h" | 10 #include "base/files/file_util_proxy.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE NativeFileUtil { | 31 class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE NativeFileUtil { |
| 32 public: | 32 public: |
| 33 enum CopyOrMoveMode { | 33 enum CopyOrMoveMode { |
| 34 COPY_NOSYNC, | 34 COPY_NOSYNC, |
| 35 COPY_SYNC, | 35 COPY_SYNC, |
| 36 MOVE | 36 MOVE |
| 37 }; | 37 }; |
| 38 static CopyOrMoveMode CopyOrMoveModeForDestination( | 38 static CopyOrMoveMode CopyOrMoveModeForDestination( |
| 39 const FileSystemURL& dest_url, bool copy); | 39 const FileSystemURL& dest_url, bool copy); |
| 40 | 40 |
| 41 static base::File CreateOrOpen(const base::FilePath& path, | 41 static base::File CreateOrOpen(const base::FilePath& path, int file_flags); |
| 42 int file_flags); | |
| 43 static base::File::Error EnsureFileExists(const base::FilePath& path, | 42 static base::File::Error EnsureFileExists(const base::FilePath& path, |
| 44 bool* created); | 43 bool* created); |
| 45 static base::File::Error CreateDirectory(const base::FilePath& path, | 44 static base::File::Error CreateDirectory(const base::FilePath& path, |
| 46 bool exclusive, | 45 bool exclusive, |
| 47 bool recursive); | 46 bool recursive); |
| 48 static base::File::Error GetFileInfo(const base::FilePath& path, | 47 static base::File::Error GetFileInfo(const base::FilePath& path, |
| 49 base::File::Info* file_info); | 48 base::File::Info* file_info); |
| 50 static scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> | 49 static scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> |
| 51 CreateFileEnumerator(const base::FilePath& root_path, | 50 CreateFileEnumerator(const base::FilePath& root_path, |
| 52 bool recursive); | 51 bool recursive); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 65 static base::File::Error DeleteFile(const base::FilePath& path); | 64 static base::File::Error DeleteFile(const base::FilePath& path); |
| 66 static base::File::Error DeleteDirectory(const base::FilePath& path); | 65 static base::File::Error DeleteDirectory(const base::FilePath& path); |
| 67 | 66 |
| 68 private: | 67 private: |
| 69 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil); | 68 DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 } // namespace fileapi | 71 } // namespace fileapi |
| 73 | 72 |
| 74 #endif // WEBKIT_BROWSER_FILEAPI_NATIVE_FILE_UTIL_H_ | 73 #endif // WEBKIT_BROWSER_FILEAPI_NATIVE_FILE_UTIL_H_ |
| OLD | NEW |