fs.getFreeSpace
From ComputerCraft Wiki
Revision as of 19:12, 21 April 2013 by Hawk777 (Talk | contribs) (Fix return value; clarify possible targets)
| Returns the amount of free space in the given directory, which may refer to the computer’s local hard drive or to a floppy disk. | |
| Syntax | fs.getFreeSpace(string path) |
| Returns | integer value of the amount of free space in the requested location, in bytes |
| Part of | ComputerCraft |
| API | fs |
Examples
| Computes the amount of free space on the computer | |
| Code |
print(tostring(fs.getFreeSpace("/")))
|
| Output | 10(can be different) |