Difference between revisions of "Fs.getFreeSpace"

From ComputerCraft Wiki
Jump to: navigation, search
Line 1: Line 1:
Fs.getFreeSpace() get's the free space in bytes of the path you give it
+
{{lowercase}}
 +
{{Function
 +
|name=fs.getFreeSpace
 +
|args=[[String_(type)|string]] path
 +
|api=fs
 +
|returns=[[String_(type)|string]] the amount of free space in bytes
 +
|desc=returns the amount of free space in the given directory
 +
|examples=
 +
{{Example
 +
|desc=Computes the amount of free space on the computer
 +
|code=print(tostring(fs.getFreeSpace("/")))
 +
|output=10(can be different)
 +
}}
  
 
+
[[Category:Lua_Core_Functions]]
{example}{
+
 
+
--Example Usage of fs.getFreeSpace
+
print(tostring(fs.getFreeSpace("/")))
+
}
+

Revision as of 21:45, 27 March 2013

{{Function |name=fs.getFreeSpace |args=string path |api=fs |returns=string the amount of free space in bytes |desc=returns the amount of free space in the given directory |examples=

Grid paper.png  Example
Computes the amount of free space on the computer
Code
print(tostring(fs.getFreeSpace("/")))
Output 10(can be different)