Storing file information in memory
am 15.11.2007 22:35:11 von Peter Paul JansenI'm writing a command line utility to move some files. I'm dealing with
thousands of files and I was wondering if anyone had any suggestions.
This is what I have currently:
$arrayVirtualFile =
array( 'filename'=>'filename',
'basename'=>'filename.ext',
'extension'=>'ext',
'size'=>0,
'dirname'=>'',
'uxtimestamp'=>'');
I then loop through a directory and for each file I populate the $arrayVirtualFile
and add it to $arrayOfVirtualFiles.
A directory of ~2500 files takes up about ~1.7 MB of memory when I run
the script.
Anyone have any suggestions as to how to take up less space?
Thanks!!
Posted by NewsLook (Trial Licence) from http://www.ghytred.com/NewsLook/about.aspx