remove OC_Filesystem::fileatime

This commit is contained in:
Robin Appelman 2011-11-08 22:26:03 +01:00
parent ec015a2e68
commit ca6c500799
5 changed files with 1 additions and 30 deletions

View File

@ -180,7 +180,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
$stat["gid"] = "";
$stat["rdev"] = "";
$stat["size"] = $this->filesize($path);
$stat["atime"] = $this->fileatime($path);
$stat["mtime"] = $this->filemtime($path);
$stat["ctime"] = $this->filectime($path);
$stat["blksize"] = "";
@ -354,27 +353,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
public function fileatime($path) {
if ($path == "" || $path == "/") {
$atime = 0;
if ($dh = $this->opendir($path)) {
while (($filename = readdir($dh)) !== false) {
$tempatime = $this->fileatime($filename);
if ($tempatime > $atime) {
$atime = $tempatime;
}
}
return $atime;
}
} else {
$source = $this->getSource($path);
if ($source) {
$storage = OC_Filesystem::getStorage($source);
return $storage->fileatime($this->getInternalPath($source));
}
}
}
public function file_get_contents($path) {
$source = $this->getSource($path);
if ($source) {

View File

@ -34,7 +34,7 @@
* A post-proxy recieves 2 arguments, the filepath and the result of the operation.
* The return calue of the post-proxy will be used as the new result of the operation
* The operations that have a post-proxy are
* file_get_contents, is_file, is_dir, file_exists, stat, is_readable, is_writable, fileatime, filemtime, filectime, file_get_contents, getMimeType, hash, free_space and search
* file_get_contents, is_file, is_dir, file_exists, stat, is_readable, is_writable, filemtime, filectime, file_get_contents, getMimeType, hash, free_space and search
*/
class OC_FileProxy{

View File

@ -39,7 +39,6 @@ class OC_Filestorage{
public function readfile($path){}
public function filectime($path){}
public function filemtime($path){}
public function fileatime($path){}
public function file_get_contents($path){}
public function file_put_contents($path,$data){}
public function unlink($path){}

View File

@ -67,9 +67,6 @@ class OC_Filestorage_Local extends OC_Filestorage{
public function filemtime($path){
return filemtime($this->datadir.$path);
}
public function fileatime($path){
return fileatime($this->datadir.$path);
}
public function file_get_contents($path){
return file_get_contents($this->datadir.$path);
}

View File

@ -251,9 +251,6 @@ class OC_Filesystem{
static public function filemtime($path){
return self::basicOperation('filemtime',$path);
}
static public function fileatime($path){
return self::basicOperation('filemtime',$path);
}
static public function file_get_contents($path){
return self::basicOperation('file_get_contents',$path,array('read'));
}