Changeset 26 for trunk/lib/Utilities.inc.php
- Timestamp:
- Dec 3, 2005 11:23:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r25 r26 234 234 235 235 return sprintf($format, $size, $units[$i]); 236 } 237 238 /** 239 * Returns stats of a file from the include path. 240 * 241 * @param string $file File in include path. 242 * @return mixed Value of requested key from fstat(), or false on error. 243 * @author Quinn Comendant <quinn@strangecode.com> 244 * @since 03 Dec 2005 14:23:26 245 */ 246 function statIncludePath($file, $stat) 247 { 248 // Open file pointer read-only using include path. 249 if ($fp = fopen($file, 'r', true)) { 250 // File opend successfully, get stats. 251 $stats = fstat($fp); 252 fclose($fp); 253 // Return specified stats. 254 return $stats[$stat]; 255 } else { 256 return false; 257 } 236 258 } 237 259
Note: See TracChangeset
for help on using the changeset viewer.