| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_OPERATION_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void CreateFile(const FilePath& path, | 38 void CreateFile(const FilePath& path, |
| 39 bool exclusive); | 39 bool exclusive); |
| 40 | 40 |
| 41 void CreateDirectory(const FilePath& path, | 41 void CreateDirectory(const FilePath& path, |
| 42 bool exclusive, | 42 bool exclusive, |
| 43 bool recursive); | 43 bool recursive); |
| 44 | 44 |
| 45 void Copy(const FilePath& src_path, | 45 void Copy(const FilePath& src_path, |
| 46 const FilePath& dest_path); | 46 const FilePath& dest_path); |
| 47 | 47 |
| 48 // If |dest_path| exists and is a directory, behavior is unspecified or | |
| 49 // varies for different platforms. TODO(kkanetkar): Fix this as per spec | |
| 50 // when it is addressed in spec. | |
| 51 void Move(const FilePath& src_path, | 48 void Move(const FilePath& src_path, |
| 52 const FilePath& dest_path); | 49 const FilePath& dest_path); |
| 53 | 50 |
| 54 void DirectoryExists(const FilePath& path); | 51 void DirectoryExists(const FilePath& path); |
| 55 | 52 |
| 56 void FileExists(const FilePath& path); | 53 void FileExists(const FilePath& path); |
| 57 | 54 |
| 58 void GetMetadata(const FilePath& path); | 55 void GetMetadata(const FilePath& path); |
| 59 | 56 |
| 60 void ReadDirectory(const FilePath& path); | 57 void ReadDirectory(const FilePath& path); |
| 61 | 58 |
| 62 void Remove(const FilePath& path); | 59 void Remove(const FilePath& path, bool recursive); |
| 63 | 60 |
| 64 void Write( | 61 void Write( |
| 65 const FilePath& path, const GURL& blob_url, int64 offset); | 62 const FilePath& path, const GURL& blob_url, int64 offset); |
| 66 | 63 |
| 67 void Truncate(const FilePath& path, int64 length); | 64 void Truncate(const FilePath& path, int64 length); |
| 68 | 65 |
| 69 void TouchFile(const FilePath& path, | 66 void TouchFile(const FilePath& path, |
| 70 const base::Time& last_access_time, | 67 const base::Time& last_access_time, |
| 71 const base::Time& last_modified_time); | 68 const base::Time& last_modified_time); |
| 72 | 69 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // A flag to make sure we call operation only once per instance. | 115 // A flag to make sure we call operation only once per instance. |
| 119 bool operation_pending_; | 116 bool operation_pending_; |
| 120 #endif | 117 #endif |
| 121 | 118 |
| 122 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); | 119 DISALLOW_COPY_AND_ASSIGN(FileSystemOperation); |
| 123 }; | 120 }; |
| 124 | 121 |
| 125 } // namespace fileapi | 122 } // namespace fileapi |
| 126 | 123 |
| 127 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 124 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| OLD | NEW |