Difference between revisions of "Fs.getFreeSpace"
From ComputerCraft Wiki
Superaxander (Talk | contribs) (Created page with "Fs.getFreeSpace() get's the free space in bytes of the path you give it == example == <nowiki> --Example Usage of fs.getFreeSpace print(tostring(fs.getFreeSpace("/"))) </no...") |
MKlegoman357 (Talk | contribs) m |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
+ | {{Function | ||
+ | |name=fs.getFreeSpace | ||
+ | |args={{Type|string}} path | ||
+ | |api=fs | ||
+ | |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. | ||
+ | |examples= | ||
+ | {{Example | ||
+ | |desc=Prints the amount of free space on the computer. | ||
+ | |code=print('''fs.getFreeSpace("/")''') | ||
+ | |output=Depends on your in-game computer's storage. | ||
+ | }} | ||
+ | }} | ||
− | + | [[Category:Lua_Core_Functions]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 16:29, 10 April 2014
Function fs.getFreeSpace | |
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
Example | |
Prints the amount of free space on the computer. | |
Code |
print(fs.getFreeSpace("/")) |
Output | Depends on your in-game computer's storage. |