コード例 #1
0
ファイル: filesystem.php プロジェクト: noccy80/lepton-ng
 function joininigpaths()
 {
     $f = FsObject::get(base::appPath());
     $p1 = $f->joinPath('foo/bar');
     $p2 = $f->joinPath(array('foo', 'bar'));
     $this->assertEquals($p1, $p2);
 }
コード例 #2
0
ファイル: fsquota.php プロジェクト: noccy80/lepton-ng
 public function checkAgainst($path)
 {
     $f = FsObject::get($path);
     if ($this->getSize() + $f->getSize() > $this->_limit) {
         return false;
     }
     return true;
 }
コード例 #3
0
ファイル: fs.php プロジェクト: noccy80/lepton-ng
 /**
  * Retrieve an array of all files and folders. (as FsObject objects)
  *
  */
 public function getListing()
 {
     $result = array();
     foreach (new DirectoryIterator($this->getAbsolute()) as $p) {
         if (!$p->isDot()) {
             $result[] = FsObject::get($p->getPathname());
             return $result;
         }
     }
     return $result;
 }