fs.getSize
From ComputerCraft Wiki
Revision as of 19:11, 21 April 2013 by Hawk777 (Talk | contribs) (Explain what this actually does, with reference to the forum post)
Function fs.getSize | |
Gets the size of a file. This is not actually the exactly length of the file in bytes; rather, it is the amount that the file contributes towards the computer’s or disk’s storage quota. This is either 512 bytes or the actual length of the file plus the length of its name, whichever is larger.[1] | |
Syntax | fs.getSize(string path) |
Returns | bytes |
Part of | ComputerCraft |
API | fs |
Examples
Example | |
Get the size of the shell from the ROM and print it | |
Code |
print( fs.getSize("/rom/programs/shell") ) |