Example #1
0
 /**
  * @return int
  */
 protected function getMode()
 {
     if (!$this->modeCache) {
         $attribute = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
         // parse hex string
         $this->modeCache = (int) hexdec(substr($attribute, 2));
     }
     return $this->modeCache;
 }
Example #2
0
 public function cleanDir($dir)
 {
     $content = $this->share->dir($dir);
     foreach ($content as $metadata) {
         if ($metadata->isDirectory()) {
             $this->cleanDir($metadata->getPath());
         } else {
             $this->share->del($metadata->getPath());
         }
     }
     $this->share->rmdir($dir);
 }