|
|
|
|
@ -58,15 +58,20 @@ class OC_Filestorage_Local extends OC_Filestorage{ |
|
|
|
|
public function filemtime($path){ |
|
|
|
|
return filemtime($this->datadir.$path); |
|
|
|
|
} |
|
|
|
|
public function touch($path, $mtime){ |
|
|
|
|
public function touch($path, $mtime=null){ |
|
|
|
|
// sets the modification time of the file to the given value. |
|
|
|
|
// If mtime is nil the current time is set. |
|
|
|
|
// note that the access time of the file always changes to the current time. |
|
|
|
|
if( touch( $this->datadir.$path, $mtime ) ) { |
|
|
|
|
if(!is_null($mtime)){ |
|
|
|
|
$result=touch( $this->datadir.$path, $mtime ); |
|
|
|
|
}else{ |
|
|
|
|
$result=touch( $this->datadir.$path); |
|
|
|
|
} |
|
|
|
|
if( $result ) { |
|
|
|
|
clearstatcache( true, $this->datadir.$path ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return touch($this->datadir.$path, $mtime); |
|
|
|
|
return $result; |
|
|
|
|
} |
|
|
|
|
public function file_get_contents($path){ |
|
|
|
|
return file_get_contents($this->datadir.$path); |
|
|
|
|
|