コード例 #1
0
 protected function scanForFiles($dir)
 {
     $result = lmbFs::findRecursive($dir, $types = 'f', $include_regex = '#.ph(tml|p)$#is');
     foreach ($result as $name) {
         $this->_found_files[] = $name;
     }
 }
コード例 #2
0
 function getCacheSize()
 {
     $files = lmbFs::findRecursive($this->storage_dir, 'f');
     $size = 0;
     foreach ($files as $file) {
         $size += filesize($file);
     }
     return $size;
 }
コード例 #3
0
ファイル: lmbFsTest.class.php プロジェクト: anykey84/YaBackup
 function testFindRecursive()
 {
     $this->_createFileSystem();
     $res = lmbFs::findRecursive(LIMB_VAR_DIR . '/tmp/', 'fd', '~test\\d_1~');
     $this->assertEqual($this->_sort($res), $this->_sort(array(lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/test1_1'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/hey/test3_1'), lmbFs::normalizePath(LIMB_VAR_DIR . '/tmp/wow/test2_1'))));
     $this->_removeFileSystem();
 }