remove OC_Filesystem::fileatime
This commit is contained in:
parent
ec015a2e68
commit
ca6c500799
|
@ -180,7 +180,6 @@ class OC_Filestorage_Shared extends OC_Filestorage {
|
||||||
$stat["gid"] = "";
|
$stat["gid"] = "";
|
||||||
$stat["rdev"] = "";
|
$stat["rdev"] = "";
|
||||||
$stat["size"] = $this->filesize($path);
|
$stat["size"] = $this->filesize($path);
|
||||||
$stat["atime"] = $this->fileatime($path);
|
|
||||||
$stat["mtime"] = $this->filemtime($path);
|
$stat["mtime"] = $this->filemtime($path);
|
||||||
$stat["ctime"] = $this->filectime($path);
|
$stat["ctime"] = $this->filectime($path);
|
||||||
$stat["blksize"] = "";
|
$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) {
|
public function file_get_contents($path) {
|
||||||
$source = $this->getSource($path);
|
$source = $this->getSource($path);
|
||||||
if ($source) {
|
if ($source) {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
* A post-proxy recieves 2 arguments, the filepath and the result of the operation.
|
* 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 return calue of the post-proxy will be used as the new result of the operation
|
||||||
* The operations that have a post-proxy are
|
* 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{
|
class OC_FileProxy{
|
||||||
|
|
|
@ -39,7 +39,6 @@ class OC_Filestorage{
|
||||||
public function readfile($path){}
|
public function readfile($path){}
|
||||||
public function filectime($path){}
|
public function filectime($path){}
|
||||||
public function filemtime($path){}
|
public function filemtime($path){}
|
||||||
public function fileatime($path){}
|
|
||||||
public function file_get_contents($path){}
|
public function file_get_contents($path){}
|
||||||
public function file_put_contents($path,$data){}
|
public function file_put_contents($path,$data){}
|
||||||
public function unlink($path){}
|
public function unlink($path){}
|
||||||
|
|
|
@ -67,9 +67,6 @@ class OC_Filestorage_Local extends OC_Filestorage{
|
||||||
public function filemtime($path){
|
public function filemtime($path){
|
||||||
return filemtime($this->datadir.$path);
|
return filemtime($this->datadir.$path);
|
||||||
}
|
}
|
||||||
public function fileatime($path){
|
|
||||||
return fileatime($this->datadir.$path);
|
|
||||||
}
|
|
||||||
public function file_get_contents($path){
|
public function file_get_contents($path){
|
||||||
return file_get_contents($this->datadir.$path);
|
return file_get_contents($this->datadir.$path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,9 +251,6 @@ class OC_Filesystem{
|
||||||
static public function filemtime($path){
|
static public function filemtime($path){
|
||||||
return self::basicOperation('filemtime',$path);
|
return self::basicOperation('filemtime',$path);
|
||||||
}
|
}
|
||||||
static public function fileatime($path){
|
|
||||||
return self::basicOperation('filemtime',$path);
|
|
||||||
}
|
|
||||||
static public function file_get_contents($path){
|
static public function file_get_contents($path){
|
||||||
return self::basicOperation('file_get_contents',$path,array('read'));
|
return self::basicOperation('file_get_contents',$path,array('read'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue