fs.getFreeSpace
From ComputerCraft Wiki
Revision as of 19:43, 22 April 2013 by Hawk777 (Talk | contribs) (Copy description from API page, clean up return, and use type template)
| 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 | int free space 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) |