summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 19:55:52 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 19:55:52 +0000
commit0d378d2ba97025fe428e285a5059535d602b0dc9 (patch)
tree331ccc4e87aedaa40c88250b5605e21cc660de66 /base/file_util.h
parent26f0f8a9e8d4bb86d6c53954d43017a36d34addb (diff)
downloadchromium_src-0d378d2ba97025fe428e285a5059535d602b0dc9.zip
chromium_src-0d378d2ba97025fe428e285a5059535d602b0dc9.tar.gz
chromium_src-0d378d2ba97025fe428e285a5059535d602b0dc9.tar.bz2
Make CopyDirectory() not copy the read only bit on Windows by reimplementing it.
Add CopyDirectoryACL test similar to CopyFileACL. Now both CopyDirectory and CopyFile exhibits the same kind of behavior. CopyDirectory is used in unit tests, on Windows installer and on OSX web_application. R=thakis@chromium.org,grt@chromium.org,rvargas@chromium.org BUG=116251 Review URL: https://codereview.chromium.org/141273010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/file_util.h b/base/file_util.h
index f841831..fbfe4d1 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -97,6 +97,9 @@ BASE_EXPORT bool ReplaceFile(const FilePath& from_path,
// Copies a single file. Use CopyDirectory to copy directories.
// This function fails if either path contains traversal components ('..').
+//
+// This function keeps the metadata on OSX and on Windows. The read only bit on
+// Windows is not kept.
BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
// Copies the given path, and optionally all subdirectories and their contents
@@ -105,6 +108,9 @@ BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
// If there are files existing under to_path, always overwrite. Returns true
// if successful, false otherwise. Wildcards on the names are not supported.
//
+// This function calls into CopyFile() so the same behavior w.r.t. metadata
+// applies.
+//
// If you only need to copy a file use CopyFile, it's faster.
BASE_EXPORT bool CopyDirectory(const FilePath& from_path,
const FilePath& to_path,