TangentFoxy / GIFS

(ON HOLD) Virtual file system for ComputerCraft computers. Allows accessing multiple disks as one big disk.
0 stars 2 forks source link

API list #2

Open TangentFoxy opened 8 years ago

TangentFoxy commented 8 years ago

Until I can figure out how to process events properly, every method in the API should first call a method to check if a drive has been plugged in, or a drive removed (or if the tree exists). If a drive has been removed, the whole directory tree needs to be rebuilt (add a function to make this unneeded if possible! call a function before removing a drive to remove its entries). If a drive has been added, its contents need to be added to the tree. Note that removing or adding a drive also needs to re-calculate free space of the system.

Internal

Note that free space and used space are not stored. Instead, when a disk is loaded, they are calculated and saved temporarily for each disk (as well as a master free/used space). The file size of the index for each disk is part of this calculation, plus 1024 bytes assumed for expansion of the index file.