summaryrefslogtreecommitdiffstats
path: root/base/file_util_posix.cc
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:39:10 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:39:10 +0000
commit8d60757991fd8e74e2d6d8a25912d24c47e9a421 (patch)
treedc406e291ef6aade6c98402b91bc1946c9952b2d /base/file_util_posix.cc
parenta5d1e1e2cf6deb70a8476fd1f970c697274cbca7 (diff)
downloadchromium_src-8d60757991fd8e74e2d6d8a25912d24c47e9a421.zip
chromium_src-8d60757991fd8e74e2d6d8a25912d24c47e9a421.tar.gz
chromium_src-8d60757991fd8e74e2d6d8a25912d24c47e9a421.tar.bz2
Revert "Add a TouchFile function that operates on FilePaths + fixing a bug"
This reverts commit 60322. TBR=dumi TEST=none BUG=none Review URL: http://codereview.chromium.org/3439019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_posix.cc')
-rw-r--r--base/file_util_posix.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index 3709afd..99e15fe 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -486,6 +486,13 @@ bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) {
return true;
}
+bool SetLastModifiedTime(const FilePath& file_path, base::Time last_modified) {
+ struct timeval times[2];
+ times[0] = last_modified.ToTimeVal();
+ times[1] = last_modified.ToTimeVal();
+ return (utimes(file_path.value().c_str(), times) == 0);
+}
+
bool GetInode(const FilePath& path, ino_t* inode) {
struct stat buffer;
int result = stat(path.value().c_str(), &buffer);