fs.getCapacity
Gets the capacity of the filesystem in bytes at the specified path.
  | 
  |||
| Get the capacity of the computer's filesystem root. | |||
| Code | <nowiki>
fs.getCapacity("")
</nowiki>
 | 
    ||
| Output | 2000000 | ||
  | 
  |||
| 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 | ||
Functions  | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Lua | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CC:Tweaked | 
  | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fs.getCapacity Function  | |
|---|---|
| 
Syntax fs.getCapacity( 
  | |
| 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.