php - Not understanding working filesize() function -


$path = "/////////.";  echo filesize( $path ); 

result 4096

what ... fail this? whence 4096 ?

answer:

$path = "/////////."; 

although looking weird, path refers root of filesystem, same /, directory. on filesystems directory takes at least 4096 bytes store (what size of 1 sector of harddisk, smallest allocation unit filesystems). size can bigger if there many files stored in directory. in system root there standard system directories, therefore 4096.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -