Difference between revisions of "Fs.getFreeSpace"

From ComputerCraft Wiki
Jump to: navigation, search
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 on the computer, in bytes
+
|returns=[[int_(type)|integer]] value of the amount of free space in the requested location, in bytes
|desc=returns the amount of free space in the given directory
+
|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


Grid Redstone.png  Function fs.getFreeSpace
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

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