summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:13:40 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:13:40 +0000
commitb82ff7e8291ac0e4cb4235b2ca27c141549974f3 (patch)
tree998e8b7eaf336996b4ff1be50e5f9784bb283059 /base/file_util.h
parent64559868446e51a2c16819608f5923f609dc027c (diff)
downloadchromium_src-b82ff7e8291ac0e4cb4235b2ca27c141549974f3.zip
chromium_src-b82ff7e8291ac0e4cb4235b2ca27c141549974f3.tar.gz
chromium_src-b82ff7e8291ac0e4cb4235b2ca27c141549974f3.tar.bz2
Add a TouchFile function that operates on FilePaths + fixing a bug
related to FILE_WRITE_ATTRIBUTES on Windows. BUG=none TEST=FileUtilTest::TouchFile Review URL: http://codereview.chromium.org/3404018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 415a192..7825d5b 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -31,7 +31,6 @@
#include "base/platform_file.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
-#include "base/time.h"
#if defined(OS_POSIX)
#include "base/eintr_wrapper.h"
@@ -318,8 +317,14 @@ bool NormalizeToNativeFilePath(const FilePath& path, FilePath* nt_path);
// Returns information about the given file path.
bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* info);
+// Sets the time of the last access and the time of the last modification.
+bool TouchFile(const FilePath& path,
+ const base::Time& last_accessed,
+ const base::Time& last_modified);
+
// Set the time of the last modification. Useful for unit tests.
-bool SetLastModifiedTime(const FilePath& file_path, base::Time last_modified);
+bool SetLastModifiedTime(const FilePath& path,
+ const base::Time& last_modified);
#if defined(OS_POSIX)
// Store inode number of |path| in |inode|. Return true on success.