fs.getCapacity

Gets the capacity of the filesystem in bytes at the specified path.

ExampleGet the capacity of the computer's filesystem root.
Get the capacity of the computer's filesystem root.
Code
<nowiki>
fs.getCapacity("")
</nowiki>
Output 2000000
ExampleGet the capacity of the inserted disk in megabytes.
Get the capacity of the inserted disk (at the path disk) in megabytes (1 megabyte = 1000000 bytes)
Code
<nowiki>
fs.getCapacity("disk") / 1000000
</nowiki>
Output 4

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

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