fs.getSize

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

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

fs.getSize
Function
Syntax
fs.getSize(
  • path : string
)

Returns number
API fs
Source CC:Tweaked (source)
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.