package fat-filesystem
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=07312d63c0b215dc1db1036db7493500fe5fe20cad05f189a74b5c51e85d8af5
sha512=856514a926d451c74756b70910f9e06aa7b55a85b5e3c1306ce4de8b3f56b477332f9f81ea85b71a591eb0cdbc540debaa2d2f418fe07aa316abb68c4d314b1c
doc/fat-filesystem/Fat_name/index.html
Module Fat_nameSource
type lfn = {lfn_deleted : bool;lfn_last : bool;(*marks the highest sequence number
*)lfn_seq : int;lfn_checksum : int;lfn_utf16_name : string;
}Long filename entry: the same size as an original DOS disk entry
type dos = {filename : string;(*8 chars
*)ext : string;(*3 chars
*)deleted : bool;read_only : bool;system : bool;volume : bool;subdir : bool;archive : bool;create : datetime;access : datetime;modify : datetime;start_cluster : int;file_size : int32;is_dot : bool;is_dotdot : bool;
}A DOS disk entry
A high-level directory entry, complete with reconstructed UTF name and offsets of each individual entry on the disk
to_pretty_string r returns a pretty version of the filename, containing both legacy DOS, extra UTF16, size and time components.
unmarshal slot parses a single directory entry from slot
marshal slot single_entry writes single_entry into slot
the size in bytes of a single_entry
blocks bits returns the directory chopped into individual bitstrings, each one containing a possible name (fragment)
fold f initial bits folds f acc offset dir_entry across all the reconstructed directory entries contained in bits.
list bits returns a list of valid (not deleted) directory entries contained within the directory bits
next bits returns the bit offset of a free directory slot. Note this function does not recycle deleted elements.
add block t return the update required to add t to the directory block. Note the update may be beyond the end of block indicating more space needs to be allocated.
find name list returns Some d where d is a name with name name (or None)
remove buf filename erases any entries corresponding to filename from buf
modify buf filename file_size start_cluster changes any entry corresponding to filename in buf to have file_size and start_cluster