Changeset 12691 for extensions/GThumb/functions.inc.php
- Timestamp:
- Dec 3, 2011, 6:11:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GThumb/functions.inc.php
r12678 r12691 131 131 } 132 132 133 function gtdirsize($path, &$size=0, &$nb_files=0) 134 { 135 if (is_dir($path)) 136 { 137 $fh = opendir($path); 138 while ($file = readdir($fh)) 139 { 140 if ($file != '.' and $file != '..' and $file != 'index.htm') 141 { 142 $pathfile = $path . '/' . $file; 143 if (is_dir($pathfile)) 144 { 145 $data = gtdirsize($pathfile, $size, $nb_files); 146 } 147 else 148 { 149 $size += filesize($pathfile); 150 $nb_files++; 151 } 152 } 153 } 154 closedir($fh); 155 } 156 return array( 157 'size' => $size, 158 'nb_files' => $nb_files, 159 ); 160 } 161 133 162 ?>
Note: See TracChangeset
for help on using the changeset viewer.