fs.getSize

From ComputerCraft
Jump to navigation Jump to search

fs.getSize
Function
Syntax
fs.getSize()
Returns number
API fs
Source CC:Tweaked (source)

Returns the size of a file in Bytes. Returns 0 if path is a directory.

ExampleExamplePrint the size of "edit"
Print the Size of "/rom/programs/edit.lua" in Bytes.
Code
print(fs.getSize("/rom/programs/edit.lua"))
Output
22975