Difference between revisions of "Fs.getFreeSpace"
From ComputerCraft Wiki
m (Nerrrrrr typo (not mine!)) |
(Fix return value; clarify possible targets) |
||
| Line 4: | Line 4: | ||
|args=[[String_(type)|string]] path | |args=[[String_(type)|string]] path | ||
|api=fs | |api=fs | ||
| − | |returns=[[int_(type)|integer]] value of the amount of free space | + | |returns=[[int_(type)|integer]] value of the amount of free space in the requested location, in bytes |
| − | |desc= | + | |desc=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. |
|examples= | |examples= | ||
{{Example | {{Example | ||
Revision as of 19:12, 21 April 2013
| 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) |