Difference between revisions of "Fs.getFreeSpace"
From ComputerCraft Wiki
(Copy description from API page, clean up return, and use type template) |
(Changing int to number) |
||
| Line 4: | Line 4: | ||
|args={{Type|string}} path | |args={{Type|string}} path | ||
|api=fs | |api=fs | ||
| − | |returns={{Type| | + | |returns={{Type|number}} free space in bytes |
|desc=Gets the remaining space in the given directory. The directory may refer to the computer’s local hard drive or to a floppy disk. | |desc=Gets the remaining space in the given directory. The directory may refer to the computer’s local hard drive or to a floppy disk. | ||
|examples= | |examples= | ||
Revision as of 13:50, 18 July 2013
| 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
| Computes the amount of free space on the computer | |
| Code |
print(tostring(fs.getFreeSpace("/")))
|
| Output | 10(can be different) |