fs.getCapacity

From ComputerCraft
Jump to navigation Jump to search

fs.getCapacity
Function
Syntax
fs.getCapacity()
Returns number capacity in bytes
API fs
Source CC:Tweaked

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

Error creating thumbnail: Unable to save thumbnail to destination
ExampleGet the capacity of the computer's filesystem root.
Get the capacity of the computer's filesystem root.
Code
fs.getCapacity("")
Output 2000000
Error creating thumbnail: Unable to save thumbnail to destination
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
fs.getCapacity("disk") / 1000000
Output 4