diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-06-15 16:43:24 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-06-15 16:43:24 +0200 |
commit | 449760f665a2416875458cbb3f34387df038b08a (patch) | |
tree | 3ad398644dee204c3b7bdc16c95effcc30d094b1 /lib/filestorage | |
parent | 6ca87656befb4ae30bd17547f34e6c3263c83c64 (diff) | |
download | nextcloud-server-449760f665a2416875458cbb3f34387df038b08a.tar.gz nextcloud-server-449760f665a2416875458cbb3f34387df038b08a.zip |
add hasUpdated to oc_filestorage
Diffstat (limited to 'lib/filestorage')
-rw-r--r-- | lib/filestorage/common.php | 9 | ||||
-rw-r--r-- | lib/filestorage/local.php | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/filestorage/common.php b/lib/filestorage/common.php index f0bfc064cb5..f2a5775fd19 100644 --- a/lib/filestorage/common.php +++ b/lib/filestorage/common.php @@ -156,4 +156,13 @@ abstract class OC_Filestorage_Common extends OC_Filestorage { } return $files; } + + /** + * check if a file or folder has been updated since $time + * @param int $time + * @return bool + */ + public function hasUpdated($path,$time){ + return $this->filemtime($path)>$time; + } } diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index ea9a9070263..44a2ab0f634 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -194,4 +194,13 @@ class OC_Filestorage_Local extends OC_Filestorage{ public function getFolderSize($path){ return 0;//depricated, use OC_FileCach instead } + + /** + * check if a file or folder has been updated since $time + * @param int $time + * @return bool + */ + public function hasUpdated($path,$time){ + return $this->filemtime($path)>$time; + } } |