dirSize() public static method

Returns size of a given directory in bytes.
public static dirSize ( string $dir ) : integer
$dir string
return integer
コード例 #1
0
ファイル: FileSystemTest.php プロジェクト: jbzoo/utils
 public function testDirSize()
 {
     $dir = dirname(__FILE__) . '/dir1';
     @mkdir($dir);
     file_put_contents($dir . '/file1', '1234567890');
     file_put_contents($dir . '/file2', range('a', 'z'));
     is(10 + 26, FS::dirSize($dir));
     FS::rmdir($dir);
 }