Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: webkit/fileapi/file_system_file_util_base.cc

Issue 6471019: Stackable file_util for FileAPIs. Sample code for discussion. Incomplete. Cannot be compiled. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698