fs.getFreeSpace

From ComputerCraft Wiki
Revision as of 13:50, 18 July 2013 by Cranium (Talk | contribs) (Changing int to number)

Jump to: navigation, search


Grid Redstone.png  Function fs.getFreeSpace
Gets the remaining space in the given directory. The directory may refer to the computer’s local hard drive or to a floppy disk.
Syntax fs.getFreeSpace(string path)
Returns number free space in bytes
Part of ComputerCraft
API fs

Examples

Grid paper.png  Example
Computes the amount of free space on the computer
Code
print(tostring(fs.getFreeSpace("/")))
Output 10(can be different)