Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ | |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ | |
| 7 | |
| 8 #include "base/file_util.h" | |
| 9 #include "base/singleton.h" | |
| 10 | |
| 11 namespace fileapi { | |
| 12 | |
| 13 class FileSystemFileUtilBase { | |
| 14 public: | |
| 15 static FileSystemFileUtilBase* GetInstance(); | |
| 16 virtual ~FileSystemFileUtilBase() {} | |
| 17 | |
| 18 virtual int CountFilesCreatedAfter( | |
| 19 const FileSystemOperationContext& fs_context, | |
| 20 const FilePath& path, | |
| 21 const base::Time& file_time); | |
| 22 | |
| 23 virtual int64 ComputeDirectorySize( | |
| 24 const FileSystemOperationContext& fs_context, | |
| 25 const FilePath& root_path); | |
| 26 | |
| 27 virtual int64 ComputeFilesSize( | |
| 28 const FileSystemOperationContext& fs_context, | |
| 29 const FilePath& directory, | |
| 30 const FilePath::StringType& pattern); | |
| 31 | |
| 32 virtual bool Delete( | |
| 33 const FileSystemOperationContext& fs_context, | |
| 34 const FilePath& path, bool recursive); | |
| 35 | |
| 36 #if defined(OS_WIN) | |
| 37 virtual bool DeleteAfterReboot( | |
| 38 const FileSystemOperationContext& fs_context, | |
| 39 const FilePath& path); | |
| 40 #endif | |
| 41 | |
| 42 virtual bool Move( | |
| 43 const FileSystemOperationContext& fs_context, | |
| 44 const FilePath& from_path, const FilePath& to_path); | |
| 45 | |
| 46 virtual bool ReplaceFile( | |
| 47 const FileSystemOperationContext& fs_context, | |
| 48 const FilePath& from_path, const FilePath& to_path); | |
| 49 | |
| 50 virtual bool CopyFile( | |
| 51 const FileSystemOperationContext& fs_context, | |
| 52 const FilePath& from_path, const FilePath& to_path); | |
| 53 | |
| 54 virtual bool CopyDirectory( | |
| 55 const FileSystemOperationContext& fs_context, | |
| 56 const FilePath& from_path, const FilePath& to_path, | |
| 57 bool recursive); | |
| 58 | |
| 59 virtual bool PathExists( | |
| 60 const FileSystemOperationContext& fs_context, | |
| 61 const FilePath& path); | |
| 62 | |
| 63 virtual bool PathIsWritable( | |
| 64 const FileSystemOperationContext& fs_context, | |
| 65 const FilePath& path); | |
| 66 | |
| 67 virtual bool DirectoryExists( | |
| 68 const FileSystemOperationContext& fs_context, | |
| 69 const FilePath& path); | |
| 70 | |
| 71 // ... | |
|
Dai Mikurube (google.com)
2011/02/10 08:35:12
FYI: Actually, not all functions in file_util are
| |
| 72 | |
| 73 protected: | |
| 74 FileSystemFileUtilBase() {} | |
| 75 | |
| 76 private: | |
| 77 friend struct DefaultSingletonTraits<FileSystemFileUtilBase>; | |
| 78 DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtilBase); | |
| 79 } | |
| 80 | |
| 81 } // namespace fileapi | |
| 82 | |
| 83 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ | |
| OLD | NEW |