remove OC_Filesystem::fileatime

remotes/origin/stable4
Robin Appelman 14 years ago
parent ec015a2e68
commit ca6c500799
  1. 22
      apps/files_sharing/sharedstorage.php
  2. 2
      lib/fileproxy.php
  3. 1
      lib/filestorage.php
  4. 3
      lib/filestorage/local.php
  5. 3
      lib/filesystem.php

@ -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) {

@ -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{

@ -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){}

@ -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);
}

@ -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'));
}

Loading…
Cancel
Save