Difference between revisions of "Fs (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m (moved FS to Fs (API))
Line 4: Line 4:
 
!style="background:#EEE" width="*"|Description
 
!style="background:#EEE" width="*"|Description
 
|-
 
|-
|fs.list( path )
+
|[[fs.list]]( path )
 
|<no description given>
 
|<no description given>
 
|-
 
|-
|fs.exists( path )
+
|[[fs.exists]]( path )
 
|Checks if the given path exists
 
|Checks if the given path exists
 
|-
 
|-
|fs.isDir( path )
+
|[[fs.isDir]]( path )
 
|Checks if the given path is a directory.
 
|Checks if the given path is a directory.
 
|-
 
|-
|fs.isReadOnly( path )
+
|[[fs.isReadOnly]]( path )
 
|Checks if you can only read to a directory.
 
|Checks if you can only read to a directory.
 
|-
 
|-
|fs.getName( path )
+
|[[fs.getName]]( path )
 
|<no description given>
 
|<no description given>
 
|-
 
|-
|fs.getDrive( path )
+
|[[fs.getDrive]]( path )
 
|<no description given>
 
|<no description given>
 
|-
 
|-
|fs.makeDir( path )
+
|[[fs.makeDir]]( path )
 
|Makes a directory.
 
|Makes a directory.
 
|-
 
|-
|fs.move( path, path )
+
|[[fs.move]]( path, path )
 
|Moves path 1 to path 2.
 
|Moves path 1 to path 2.
 
|-
 
|-
|fs.copy( path, path )
+
|[[fs.copy]]( path, path )
 
|Copies path 1 to path 2.
 
|Copies path 1 to path 2.
 
|-
 
|-
|fs.delete( path )
+
|[[fs.delete]]( path )
 
|Deletes the given path.
 
|Deletes the given path.
 
|-
 
|-
|fs.combine( path, localpath )
+
|[[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.
 
|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 )
+
|[[fs.open]]( path, mode )
 
|Opens the given path. Modes: "r", "w", "a", "rb", "wb", "ab". Meaning: <no description given>
 
|Opens the given path. Modes: "r", "w", "a", "rb", "wb", "ab". Meaning: <no description given>
 
|}
 
|}
 
[[Category:APIs]]
 
[[Category:APIs]]

Revision as of 21:26, 26 February 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>