Difference between revisions of "Fs.getFreeSpace"

From ComputerCraft Wiki
Jump to: navigation, search
m (number =>> integer (type))
m (Nerrrrrr typo (not mine!))
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=fs.getFreeSpace
 
|name=fs.getFreeSpace
|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 on the computer, in bytes
 
|returns=[[int_(type)|integer]] value of the amount of free space on the computer, in bytes

Revision as of 02:04, 13 April 2013


Grid Redstone.png  Function fs.getFreeSpace
returns the amount of free space in the given directory
Syntax fs.getFreeSpace(string path)
Returns integer value of the amount of free space on the computer, in bytes
Part of ComputerCraft
API fs

Examples

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