示例#1
0
文件: Dir.php 项目: jacksleight/coast
 public function permissions($mode = null, $recursive = false)
 {
     if (isset($mode)) {
         if ($recursive) {
             foreach ($this->iterator(null, true, \RecursiveIteratorIterator::CHILD_FIRST) as $child) {
                 $child->chmod($mode);
             }
         }
         chmod($this->_name, $mode);
         return $this;
     }
     return parent::permissions();
 }
示例#2
0
 public function permissions($mode = null)
 {
     if (isset($mode)) {
         chmod($this->_name, $mode);
         return $this;
     }
     return parent::permissions();
 }