webrtc/base: FileModifyTime -> OlderThan as that's what it was ever used as. Needed for cl/70828325.
BUG=N/A R=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/21939004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6787 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -132,15 +132,14 @@ size_t DirectoryIterator::FileSize() const {
|
||||
#endif
|
||||
}
|
||||
|
||||
// returns the last modified time of this file
|
||||
time_t DirectoryIterator::FileModifyTime() const {
|
||||
bool DirectoryIterator::OlderThan(int seconds) const {
|
||||
time_t file_modify_time;
|
||||
#if defined(WEBRTC_WIN)
|
||||
time_t val;
|
||||
FileTimeToUnixTime(data_.ftLastWriteTime, &val);
|
||||
return val;
|
||||
FileTimeToUnixTime(data_.ftLastWriteTime, &file_modify_time);
|
||||
#else
|
||||
return stat_.st_mtime;
|
||||
file_modify_time = stat_.st_mtime;
|
||||
#endif
|
||||
return TimeDiff(time(NULL), file_modify_time) >= seconds;
|
||||
}
|
||||
|
||||
FilesystemInterface* Filesystem::default_filesystem_ = NULL;
|
||||
|
@@ -67,8 +67,8 @@ class DirectoryIterator {
|
||||
// returns the size of the file currently pointed to
|
||||
virtual size_t FileSize() const;
|
||||
|
||||
// returns the last modified time of the file currently pointed to
|
||||
virtual time_t FileModifyTime() const;
|
||||
// returns true if the file is older than seconds
|
||||
virtual bool OlderThan(int seconds) const;
|
||||
|
||||
// checks whether current file is a special directory file "." or ".."
|
||||
bool IsDots() const {
|
||||
|
Reference in New Issue
Block a user