- Oct 13, 2006
- 64
- 0
- 0
I have to write a code that reads the local machines hard disk, and then later on change it to read a network machines memory. This is what I came up with ( its almost like a flowchart), I can figure out the coding later but for now I just need a basic flowchart to give me directions... C&C is what im here for. please.
$handle = opendir('a main directory like C:');
While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
$harddisk_size = 0;
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.
if(ITEM == a folder){
$handle = opendir('that folder'); and reapeted at top....
While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.
just thought of it what if i have many subfolders.....
$handle = opendir('a main directory like C:');
While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
$harddisk_size = 0;
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.
if(ITEM == a folder){
$handle = opendir('that folder'); and reapeted at top....
While( read next ITEM in directory - possibaly (false !== ($file = readdir($handle))){
if ( ITEM != a folder){
Do while ( $filename = read next file in folder !== NULL){
$file_size = filesize(Directory . filename);
$total_size = $size + $total_size;
echo $total_size.
just thought of it what if i have many subfolders.....
