Banner

Pseudo Code

 

Process function                                   

look up starting cluster for directory

read entry from that cluster + 31

While first byte != 0

If it is a valid entry depending on the attribute value not 0X0F and highest two bits are not on.

Insertion sort as you go along

If it is a directory and our recursive switch was set

save location on disk

            run process

restore location

if the find flag was set, determine if this file matches our criteria

            if not don’t insert it.

                        Else put it into buffer

 

            read next 32 bytes

End while

End process function

 

Match function

            If strcmp(criteria, buffer[0-7]+’.’+buffer[8..10])

                        Return false

            Else

return true

//Do we inplement wildcards?

End match

 

 

Main function

Determine which parameters were set

Read root directory entries at sector 19.

Do loop

Read 32 bytes at a time into a buffer.

If it is a valid entry depending on the attribute value not 0X0F and highest two bits are not on.

Insertion sort as you go along

If it is a directory and our recursive switch was set

save location on disk

                        run process

                        restore location

            if the find flag was set, determine if this file matches our criteria

            if not don’t insert it.

Else put it into buffer

until buffer[0] == 0    

 

while what is inserted was not 0 at first byte of entry.

go through buffer and print out information.  Look at table to decrypt information

first 11 is filename, then attribute.. etc…

step by 32 byte increments

End while


Home | About Me | Text Depository | Future Enhancements | Guest Book | Links

Copyright © 1998-2008 Michael Chungkun Chen
All Rights Reserved.