Ejemplo n.º 1
0
 public function touch($path, $mtime = null)
 {
     if (is_null($mtime)) {
         $mtime = time();
     }
     $path = $this->cleanPath($path);
     $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime));
 }
Ejemplo n.º 2
0
 public function touch($path, $mtime = null)
 {
     $this->init();
     if (is_null($mtime)) {
         $mtime = time();
     }
     $path = $this->cleanPath($path);
     // if file exists, update the mtime, else create a new empty file
     if ($this->file_exists($path)) {
         $this->client->proppatch($path, array('{DAV:}lastmodified' => $mtime));
     } else {
         $this->file_put_contents($path, '');
     }
 }