Chromium Code Reviews| Index: webkit/fileapi/file_system_file_util_base.h |
| diff --git a/webkit/fileapi/file_system_file_util_base.h b/webkit/fileapi/file_system_file_util_base.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0591a906d5d2f2e92cad17197788132152612a3d |
| --- /dev/null |
| +++ b/webkit/fileapi/file_system_file_util_base.h |
| @@ -0,0 +1,83 @@ |
| +// 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. |
| + |
| +#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ |
| +#define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ |
| + |
| +#include "base/file_util.h" |
| +#include "base/singleton.h" |
| + |
| +namespace fileapi { |
| + |
| +class FileSystemFileUtilBase { |
| + public: |
| + static FileSystemFileUtilBase* GetInstance(); |
| + virtual ~FileSystemFileUtilBase() {} |
| + |
| + virtual int CountFilesCreatedAfter( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path, |
| + const base::Time& file_time); |
| + |
| + virtual int64 ComputeDirectorySize( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& root_path); |
| + |
| + virtual int64 ComputeFilesSize( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& directory, |
| + const FilePath::StringType& pattern); |
| + |
| + virtual bool Delete( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path, bool recursive); |
| + |
| +#if defined(OS_WIN) |
| + virtual bool DeleteAfterReboot( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path); |
| +#endif |
| + |
| + virtual bool Move( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path); |
| + |
| + virtual bool ReplaceFile( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path); |
| + |
| + virtual bool CopyFile( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path); |
| + |
| + virtual bool CopyDirectory( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& from_path, const FilePath& to_path, |
| + bool recursive); |
| + |
| + virtual bool PathExists( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path); |
| + |
| + virtual bool PathIsWritable( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path); |
| + |
| + virtual bool DirectoryExists( |
| + const FileSystemOperationContext& fs_context, |
| + const FilePath& path); |
| + |
| + // ... |
|
Dai Mikurube (google.com)
2011/02/10 08:35:12
FYI: Actually, not all functions in file_util are
|
| + |
| + protected: |
| + FileSystemFileUtilBase() {} |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<FileSystemFileUtilBase>; |
| + DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtilBase); |
| +} |
| + |
| +} // namespace fileapi |
| + |
| +#endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_BASE_H_ |