Difference between revisions of "ChucK/Dev/IO/FileIO"
From CSWiki
Line 3: | Line 3: | ||
==FileIO Class== | ==FileIO Class== | ||
The <tt>FileIO</tt> class is a subclass of the [[ChucK/Dev/IO#IO_Class|<tt>IO</tt>]] class. | The <tt>FileIO</tt> class is a subclass of the [[ChucK/Dev/IO#IO_Class|<tt>IO</tt>]] class. | ||
+ | |||
===Methods=== | ===Methods=== | ||
+ | ; <code>fun int open(string path[, int flags])</code> : Opens the specified file, returning true on success and false otherwise. The flags can optionally be used to specify the mode in which to open the file (<code>FileIO.MODE_READ_WRITE</code> by default). | ||
+ | |||
===Events=== | ===Events=== | ||
+ | |||
===Constants=== | ===Constants=== | ||
; <code>FileIO.stdin</code><br /><code>FileIO.stdout</code> : Pre-created files for reading from and writing to <tt>stdin</tt> and <tt>stdout</tt>. | ; <code>FileIO.stdin</code><br /><code>FileIO.stdout</code> : Pre-created files for reading from and writing to <tt>stdin</tt> and <tt>stdout</tt>. | ||
+ | ; <code>FileIO.MODE_READ_WRITE</code><br /><code>FileIO.MODE_READONLY</code><br /><code>FileIO.MODE_WRITEONLY</code> : These flags can optionally be passed to the <code>open</code> function to specify the mode in which to open the file. |
Revision as of 12:02, 6 March 2008
The following is subject to change.
Contents
FileIO Class
The FileIO class is a subclass of the IO class.
Methods
-
fun int open(string path[, int flags])
- Opens the specified file, returning true on success and false otherwise. The flags can optionally be used to specify the mode in which to open the file (
FileIO.MODE_READ_WRITE
by default).
Events
Constants
-
FileIO.stdin
FileIO.stdout
- Pre-created files for reading from and writing to stdin and stdout.
-
FileIO.MODE_READ_WRITE
FileIO.MODE_READONLY
FileIO.MODE_WRITEONLY
- These flags can optionally be passed to the
open
function to specify the mode in which to open the file.