コード例 #1
0
ファイル: NativeFileInfo.php プロジェクト: evanjt/core
 /**
  * @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;
 }
コード例 #2
0
ファイル: NativeStream.php プロジェクト: ninjasilicon/core
 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);
 }