Difference between revisions of "Fs (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "The FS API allows you to mess around with the filesystem. <functions table here> Category:APIs")
 
Line 1: Line 1:
 
The FS API allows you to mess around with the filesystem.
 
The FS API allows you to mess around with the filesystem.
<functions table here>
+
{| border="1" cellpadding="2" cellspacing="0"
 +
!style="background:#EEE" width="200px"|Method name
 +
!style="background:#EEE" width="*"|Description
 +
|-
 +
|fs.list( path )
 +
|<no description given>
 +
|-
 +
|fs.exists( path )
 +
|Checks if the given path exists
 +
|-
 +
|fs.isDir( path )
 +
|Checks if the given path is a directory.
 +
|-
 +
|fs.isReadOnly( path )
 +
|Checks if you can only read to a directory.
 +
|-
 +
|fs.getName( path )
 +
|<no description given>
 +
|-
 +
|fs.getDrive( path )
 +
|<no description given>
 +
|-
 +
|fs.makeDir( path )
 +
|Makes a directory.
 +
|-
 +
|fs.move( path, path )
 +
|Moves path 1 to path 2.
 +
|-
 +
|fs.copy( path, path )
 +
|Copies path 1 to path 2.
 +
|-
 +
|fs.delete( path )
 +
|Deletes the given path.
 +
|-
 +
|fs.combine( path, localpath )
 +
|Adds the given path and the local path together to make a new path. Like if localpath is C\ and path is programs\, it will make C\programs\ and return it.
 +
|-
 +
|fs.open( path, mode )
 +
|Opens the given path. Modes: "r", "w", "a", "rb", "wb", "ab". Meaning: <no description given>
 +
|}
 
[[Category:APIs]]
 
[[Category:APIs]]

Revision as of 06:03, 31 January 2012

The FS API allows you to mess around with the filesystem.

Method name Description
fs.list( path ) <no description given>
fs.exists( path ) Checks if the given path exists
fs.isDir( path ) Checks if the given path is a directory.
fs.isReadOnly( path ) Checks if you can only read to a directory.
fs.getName( path ) <no description given>
fs.getDrive( path ) <no description given>
fs.makeDir( path ) Makes a directory.
fs.move( path, path ) Moves path 1 to path 2.
fs.copy( path, path ) Copies path 1 to path 2.
fs.delete( path ) Deletes the given path.
fs.combine( path, localpath ) Adds the given path and the local path together to make a new path. Like if localpath is C\ and path is programs\, it will make C\programs\ and return it.
fs.open( path, mode ) Opens the given path. Modes: "r", "w", "a", "rb", "wb", "ab". Meaning: <no description given>