Difference between revisions of "Fs.getFreeSpace"
From ComputerCraft Wiki
Superaxander (Talk | contribs) |
MKlegoman357 (Talk | contribs) m |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=fs.getFreeSpace | |name=fs.getFreeSpace | ||
| − | |args= | + | |args={{Type|string}} path |
|api=fs | |api=fs | ||
| − | |returns= | + | |returns={{Type|number}} free space in bytes |
| − | |desc= | + | |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= | ||
{{Example | {{Example | ||
| − | |desc= | + | |desc=Prints the amount of free space on the computer. |
| − | |code=print( | + | |code=print('''fs.getFreeSpace("/")''') |
| − | |output= | + | |output=Depends on your in-game computer's storage. |
}} | }} | ||
}} | }} | ||
| + | |||
[[Category:Lua_Core_Functions]] | [[Category:Lua_Core_Functions]] | ||
Latest revision as of 16:29, 10 April 2014
| 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
| Prints the amount of free space on the computer. | |
| Code |
print(fs.getFreeSpace("/"))
|
| Output | Depends on your in-game computer's storage. |