-
Effekt Library
- io/filesystem
- File
- readFile
- writeFile
- appendFile
- writeFileUTF8
- readFileUTF8
- writeFile
- readFile
- Files
- readFile
- writeFile
- filesystem
- openForReading
- openForWriting
- openForAppending
- read
- write
- close
- mkdir
- internal
- openForReading
- openForWriting
- openForAppending
- read
- write
- close
- mkdir
- examples
- copy
- main
- io/filesystem Jump to source: libraries/common/io/filesystem.effekt
- File
- readFile
(path: String): String / {Exception[IOError]} - writeFile
(path: String, contents: String): Unit / {Exception[IOError]} - appendFile
(path: String, contents: String): Unit / {Exception[IOError]} - writeFileUTF8
[R] (path: String) { stream: => R / {emit[Char]} }: R / {Exception[IOError]} - readFileUTF8
[R] (path: String) { reader: => R / {read[Char]} }: R / {Exception[IOError]} - writeFile
[R] (path: String) { stream: => R / {emit[Byte]} }: R / {Exception[IOError]} - readFile
[R] (path: String) { reader: => R / {read[Byte]} }: R / {Exception[IOError]} - Files
- readFile
(path: String): String / {} - writeFile
(path: String, contents: String): Unit / {} - filesystem
[R] { program: => R / {Files} }: R / {Exception[IOError]} - openForReading
(path: String): File / {Exception[IOError]} - openForWriting
(path: String): File / {Exception[IOError]} - openForAppending
(path: String): File / {Exception[IOError]} - read
(file: File, buffer: ByteArray, offset: Int, size: Int, position: Int): Int / {Exception[IOError]} - write
(file: File, buffer: ByteArray, offset: Int, size: Int, position: Int): Int / {Exception[IOError]} - close
(file: File): Unit / {Exception[IOError]} - mkdir
(path: String): Unit / {Exception[IOError]} - internal
- openForReading
(path: String): Int / {} - openForWriting
(path: String): Int / {} - openForAppending
(path: String): Int / {} - read
(file: Int, buffer: ByteArray, offset: Int, size: Int, position: Int): Int / {} - write
(file: Int, buffer: ByteArray, offset: Int, size: Int, position: Int): Int / {} - close
(file: Int): Int / {} - mkdir
(path: String): Int / {} - examples
- copy
(from: String, to: String): Unit / {Files} - main
Example usage: examples/stdlib/io/filesystem
A file descriptor. Should not be inspected.
Reads a file at given path as utf8 encoded string.
Writes the (utf8 encoded) string `contents` into the specified file.
Appends the (utf8 encoded) string `contents` to the specified file.
An abstract interface applications can program against. Can be interpreted with the `filesystem` handler, or virtualized etc. See example below.
Using the file system via node.js