diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 01:50:39 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-21 01:50:39 +0000 |
commit | 4b7743de2632a9d226bd5494b90eee6baceb5855 (patch) | |
tree | a5101566eecf3e1b66845bd62393f97e4bf509f0 /base/file_util.h | |
parent | a0b1c513361089833a7b2ecdc5483eff0d944d60 (diff) | |
download | chromium_src-4b7743de2632a9d226bd5494b90eee6baceb5855.zip chromium_src-4b7743de2632a9d226bd5494b90eee6baceb5855.tar.gz chromium_src-4b7743de2632a9d226bd5494b90eee6baceb5855.tar.bz2 |
Implement file_util::CountFilesCreatedAfter() for posix environments.
BUG=9833
Review URL: http://codereview.chromium.org/87003
Patch from Shinichiro Hamaji <hamaji@google.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r-- | base/file_util.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/base/file_util.h b/base/file_util.h index 20d98b0..f12d6f2 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -137,12 +137,15 @@ void ReplaceIllegalCharacters(std::wstring* file_name, int replace_char); //----------------------------------------------------------------------------- // Functions that involve filesystem access or modification: -#if defined(OS_WIN) -// Returns the number of files matching the current path that were // created on or after the given |file_time|. Doesn't count ".." or ".". +// +// Note for POSIX environments: a file created before |file_time| +// can be mis-detected as a newer file due to low precision of +// timestmap of file creation time. If you need to avoid such +// mis-detection perfectly, you should wait one second before +// obtaining |file_time|. int CountFilesCreatedAfter(const FilePath& path, const base::Time& file_time); -#endif // defined(OS_WIN) // Deletes the given path, whether it's a file or a directory. // If it's a directory, it's perfectly happy to delete all of the |