171
edits
(→Directories: added a link to the discussion) |
(→Files: simplified open arguments) |
||
| Line 17: | Line 17: | ||
==== Files ==== | ==== Files ==== | ||
; open(path | ; open(path String, mode|options) | ||
: returns a stream object that supports an appropriate interface for the given options and mode, which include reading, writing, updating, byte, character, unbuffered, buffered, and line buffered streams. More details follow in the [#Stream] section of this document. | : returns a stream object that supports an appropriate interface for the given options and mode, which include reading, writing, updating, byte, character, unbuffered, buffered, and line buffered streams. More details follow in the [#Stream] section of this document. | ||
* path | * path | ||
* mode: "rwa+bxc", | * mode: "rwa+bxc", or | ||
* options | * options | ||
** | ** mode String | ||
** charset String | ** charset String | ||
** | ** read Boolean | ||
** | ** write Boolean | ||
; read(path String | ** append Boolean | ||
** update Boolean | |||
** binary Boolean | |||
** exclusive Boolean | |||
** canonical Boolean | |||
; read(path String, [mode|options]) | |||
: opens, reads, and closes a file, returning its content. | : opens, reads, and closes a file, returning its content. | ||
; write(path String | ; write(path String, content String|Binary, [mode|options]) | ||
: opens, writes, flushes, and closes a file with the given content. If the content is a ByteArray or ByteString, the binary mode is implied. | : opens, writes, flushes, and closes a file with the given content. If the content is a ByteArray or ByteString, the binary mode is implied. | ||
; copy(source String, target String) | ; copy(source String, target String) | ||
edits