Chromium Code Reviews| Index: webkit/fileapi/file_system_file_util_base.cc |
| diff --git a/webkit/fileapi/file_system_file_util_base.cc b/webkit/fileapi/file_system_file_util_base.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..57f0774cdee344fe9272ab44d97b9942b3d25034 |
| --- /dev/null |
| +++ b/webkit/fileapi/file_system_file_util_base.cc |
| @@ -0,0 +1,92 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "webkit/fileapi/file_system_file_util.h" |
| + |
| +#include "base/file_util.h" |
| + |
| +namespace fileapi { |
| + |
| +FileSystemFileUtilBase* FileSystemFileUtilBase::GetInstance() { |
| + return Singleton<FileSystemFileUtilBase>::get(); |
| +} |
| + |
| +int FileSystemFileUtilBase::CountFilesCreatedAfter( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path, |
| + const base::Time& file_time) { |
| + return file_util::CountFilesCreatedAfter(path, file_time); |
| +} |
| + |
| +int64 FileSystemFileUtilBase::ComputeDirectorySize( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& root_path) { |
| + return file_util::ComputeDirectorySize(root_path); |
| +} |
| + |
| +int64 FileSystemFileUtilBase::ComputeFilesSize( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& directory, |
| + const FilePath::StringType& pattern) { |
| + return file_util::ComputeFilesSize(directory, pattern); |
| +} |
| + |
| +bool FileSystemFileUtilBase::Delete( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path, bool recursive) { |
| + return file_util::Delete(path); |
| +} |
| + |
| +#if defined(OS_WIN) |
| +bool FileSystemFileUtilBase::DeleteAfterReboot( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path) { |
| + return file_util::DeleteAfterReboot(path); |
| +} |
| +#endif |
| + |
| +bool FileSystemFileUtilBase::Move( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path) { |
| + return file_util::Move(from_path, to_path); |
| +} |
| + |
| +bool FileSystemFileUtilBase::ReplaceFile( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path) { |
| + return file_util::ReplaceFile(from_path, to_path); |
| +} |
| + |
| +bool FileSystemFileUtilBase::CopyFile( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path) { |
| + 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
|
| +} |
| + |
| +bool FileSystemFileUtilBase::CopyDirectory( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path, |
| + bool recursive) { |
| + return file_util::CopyDirectory(from_path, to_path, recursive); |
| +} |
| + |
| +bool FileSystemFileUtilBase::PathExists( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path) { |
| + return file_util::PathExists(path); |
| +} |
| + |
| +bool FileSystemFileUtilBase::PathIsWritable( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path) { |
| + return file_util::PathIsWritable(path); |
| +} |
| + |
| +bool FileSystemFileUtilBase::DirectoryExists( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path) { |
| + return file_util::DirectoryExists(path); |
| +} |
| + |
| +} |