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 #include "webkit/fileapi/file_system_file_util.h" | |
| 6 | |
| 7 #include "base/file_util.h" | |
| 8 | |
| 9 namespace fileapi { | |
| 10 | |
| 11 FileSystemFileUtilBase* FileSystemFileUtilBase::GetInstance() { | |
| 12 return Singleton<FileSystemFileUtilBase>::get(); | |
| 13 } | |
| 14 | |
| 15 int FileSystemFileUtilBase::CountFilesCreatedAfter( | |
| 16 const FileSystemOperationContext& fs_context, | |
| 17 const FilePath& path, | |
| 18 const base::Time& file_time) { | |
| 19 return file_util::CountFilesCreatedAfter(path, file_time); | |
| 20 } | |
| 21 | |
| 22 int64 FileSystemFileUtilBase::ComputeDirectorySize( | |
| 23 const FileSystemOperationContext& fs_context, | |
| 24 const FilePath& root_path) { | |
| 25 return file_util::ComputeDirectorySize(root_path); | |
| 26 } | |
| 27 | |
| 28 int64 FileSystemFileUtilBase::ComputeFilesSize( | |
| 29 const FileSystemOperationContext& fs_context, | |
| 30 const FilePath& directory, | |
| 31 const FilePath::StringType& pattern) { | |
| 32 return file_util::ComputeFilesSize(directory, pattern); | |
| 33 } | |
| 34 | |
| 35 bool FileSystemFileUtilBase::Delete( | |
| 36 const FileSystemOperationContext& fs_context, | |
| 37 const FilePath& path, bool recursive) { | |
| 38 return file_util::Delete(path); | |
| 39 } | |
| 40 | |
| 41 #if defined(OS_WIN) | |
| 42 bool FileSystemFileUtilBase::DeleteAfterReboot( | |
| 43 const FileSystemOperationContext& fs_context, | |
| 44 const FilePath& path) { | |
| 45 return file_util::DeleteAfterReboot(path); | |
| 46 } | |
| 47 #endif | |
| 48 | |
| 49 bool FileSystemFileUtilBase::Move( | |
| 50 const FileSystemOperationContext& fs_context, | |
| 51 const FilePath& from_path, const FilePath& to_path) { | |
| 52 return file_util::Move(from_path, to_path); | |
| 53 } | |
| 54 | |
| 55 bool FileSystemFileUtilBase::ReplaceFile( | |
| 56 const FileSystemOperationContext& fs_context, | |
| 57 const FilePath& from_path, const FilePath& to_path) { | |
| 58 return file_util::ReplaceFile(from_path, to_path); | |
| 59 } | |
| 60 | |
| 61 bool FileSystemFileUtilBase::CopyFile( | |
| 62 const FileSystemOperationContext& fs_context, | |
| 63 const FilePath& from_path, const FilePath& to_path) { | |
| 64 return file_util::CopyFile(from_path, to_path); | |
|
Dai Mikurube (google.com)
2011/02/10 08:35:12
Just calling file_util::CopyFile() without fs_cont
| |
| 65 } | |
| 66 | |
| 67 bool FileSystemFileUtilBase::CopyDirectory( | |
| 68 const FileSystemOperationContext& fs_context, | |
| 69 const FilePath& from_path, const FilePath& to_path, | |
| 70 bool recursive) { | |
| 71 return file_util::CopyDirectory(from_path, to_path, recursive); | |
| 72 } | |
| 73 | |
| 74 bool FileSystemFileUtilBase::PathExists( | |
| 75 const FileSystemOperationContext& fs_context, | |
| 76 const FilePath& path) { | |
| 77 return file_util::PathExists(path); | |
| 78 } | |
| 79 | |
| 80 bool FileSystemFileUtilBase::PathIsWritable( | |
| 81 const FileSystemOperationContext& fs_context, | |
| 82 const FilePath& path) { | |
| 83 return file_util::PathIsWritable(path); | |
| 84 } | |
| 85 | |
| 86 bool FileSystemFileUtilBase::DirectoryExists( | |
| 87 const FileSystemOperationContext& fs_context, | |
| 88 const FilePath& path) { | |
| 89 return file_util::DirectoryExists(path); | |
| 90 } | |
| 91 | |
| 92 } | |
| OLD | NEW |