Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Basic FAT type filesystem for now. Maybe move on to journaling later
- Types of filesystem objects:
- Directories
- Files
- Symlinks
- Directory Format:
- db FILE_DIRECTORY
- db "Name can be any length",0
- ; files
- File Format in FAT:
- db FILE_FILE
- db "Name can be any length",0
- dw POINTER_TO_DATA
- dw LENGTH_OF_DATA
- File Format in Flash:
- db "Name can be any lenght",0
- dw LENGTH_OF_DATA
- ;Data
- Symlink Format:
- db FILE_SYMLINK
- db "Name can be any length",0
- db "path to file/folder",0
- The extra copy of the FAT header in the files data is in case of FAT corruption, you still know that there is a file and what it is called.
- Possible FILE_ types:
- FILE_START <- start of the fat
- FILE_NULL <- nothing here remove on next fat cleanup
- FILE_DELETED <- this file has been deleted remove on garbage collect
- FILE_FILE <- standard file
- FILE_DIRECTORY <-directory header
- FILE_END_DIRECTORY <-end of a directory entry
- FILE_SYMLINK <= link to a file/directory
- FILE_END <= end of the FAT
- could change.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement