-
Notifications
You must be signed in to change notification settings - Fork 434
Detailed filesystem.mounts ()
Vexatos edited this page Jul 13, 2014
·
2 revisions
For those that don't like images: the wiki has moved to a new place, http://ocdoc.cil.li/.
This wiki will no longer be updated.
-
filesystem.mounts(): function -> table, string
Returns an iterator function over all currently mounted file system component's proxies and the paths at which they are mounted. This means the same proxy may appear multiple times, but with different mount paths.{ ['address'] = (string), -- Example being: 95500515-87f5-4fc8-bb83-c206d95982e2 ['type'] = (string), -- Examples: rom, tmpfs, internet, disk, robot ['spaceUsed'] = { ['address'] = (string), ['name'] = (string) "spaceUsed", ['__call'] = (function) returns bytes used, }, ['setLabel'] = { ['address'] = (string), ['name'] = (string) "setLabel", ['__call'] = (function) takes 1 argument, sets mount label }, ['getLabel'] = { ['address'] = (string), ['name'] = (string) "setLabel", ['__call'] = (function) takes 1 argument, gets mount label }, ['remove'] = { ['address'] = (string), ['name'] = (string) "remove", ['__call'] = (function) Takes 1 input (path) , see filesystem.remove --Example, .remove ( 'data' ) equals filesystem.delete ( '/mnt/[point]/data' ), same with all functions below } ['lastModified'] = { ['address'] = (string), ['name'] = (string) "lastModified", ['__call'] = (functon) Takes 1 input (path), see filesystem.lastModified } ['list'] = { ['address'] = (string), ['name'] = (string) "list", ['__call'] = (function) Takes 1 input (path), see filesystem.list } ['open'] = { ['address'] = (string), ['name'] = (string) "open", ['__call'] = (function) Takes 2 inputs (path,mode), see filesystem.open } ['size'] = { ['address'] = (string), ['name'] = (string) "size", ['__call'] = (function) Takes 1 input (path), see filesystem.size } ['makeDirectory'] = { ['address'] = (string), ['name'] = (string) "makeDirectory", ['__call'] = (function) Takes 1 input (path), see filesystem.makeDirectory } ['rename'] = { ['address'] = (string), ['name'] = (string) "rename", ['__call'] = (function) Takes 2 inputs (oldPath, newPath), see filesystem.rename }, ['isDirectory'] = { ['address'] = (string), ['name'] = (string) "isDirectory", ['__call'] = (function) Takes 1 inputs (path), see filesystem.isDirectory }, ['exists'] = { ['address'] = (string), ['name'] = (string) "exists", ['__call'] = (function) Takes 1 inputs (path), see filesystem.exists }, ['spaceTotal'] = { ['address'] = (string), ['name'] = (string) "spaceTotal", ['__call'] = (function) Dont know }, ['isReadOnly'] = { ['address'] = (string), ['name'] = (string) "isReadyOnly", ['__call'] = (function) Takes 1 inputs (path), see filesystem.isReadyOnly }, -- this table repesents the filesystem, as such it contains all the functions to deal with it, this includes read (), write (), seek () and close (). ['read'] = { ['address'] = (string), ['name'] = (string) "read", ['__call'] = (function) } ['write'] = { ['address'] = (string), ['name'] = (string) "write", ['__call'] = (function) } ['seek'] = { ['address'] = (string), ['name'] = (string) "seek", ['__call'] = (function) } ['close'] = { ['address'] = (string), ['name'] = (string) "close", ['__call'] = (function) } }