File(Standardlibrary/IO/File)
The File Type allows for opening files,reading and writing files.
var file = ?File::Open("my.txt");
File Open functions
Signature | Description |
---|---|
|Open[PathSpan filename] -> OpenedFile ! OpenFileError | Opens file returns an error or an OpenedFile. |
|Open[imut Path& filename] -> OpenedFile ! OpenFileError | Opens file returns an error or an OpenedFile. |
|Open[imut String& filename] -> OpenedFile ! OpenFileError | Opens file returns an error or an OpenedFile. |
|Open[imut StringSpan& filename] -> OpenedFile ! OpenFileError | Opens file returns an error or an OpenedFile. |
File Read String functions
Signature | Description |
---|---|
|ReadString[imut StringSpan& filename] -> String ! OpenFileError | Tryes to file a as a string or returns an error if there is one. |
|ReadString[imut Path& filename] -> String ! OpenFileError | Tryes to read file a as a string or returns an error if there is one. |
|ReadString[PathSpan filename filename] -> String ! OpenFileError | Tryes read to file a as a string or returns an error if there is one. |
|ReadString[imut String filename] -> String ! OpenFileError | Tryes read to file a as a string or returns an error if there is one. |
File Read Bytes functions
Signature | Description |
---|---|
|ReadBytes[imut StringSpan filename] -> Vector<byte> ! OpenFileError | Tryes to read file a as a Vector of bytes or returns an error if there is one. |
|ReadBytes[imut String& filename] -> Vector<byte> ! OpenFileError | Tryes to read file a as a Vector of bytes or returns an error if there is one. |
|ReadBytes[imut PathSpan filename] -> Vector<byte> ! OpenFileError | Tryes to read file a as a Vector of bytes or returns an error if there is one. |
|ReadBytes[imut Path& filename]& -> Vector<byte> ! OpenFileError | Tryes to file read a as a Vector of bytes or returns an error if there is one. |
File Write String functions
Signature | Description |
---|---|
|Write[imut StringSpan filename,imut StringSpan data] -> Empty ! FileOpenWriteError | Writes data the a file or returns an error if there is one. |
|Write[imut String& filename,imut StringSpan data] -> Empty ! FileOpenWriteError | Writes data the a file or returns an error if there is one. |
|Write[imut PathSpan filename,imut StringSpan data] -> Empty ! FileOpenWriteError | Writes data the a file or returns an error if there is one. |
|Write[imut Path &filename,imut StringSpan data] -> Empty ! FileOpenWriteError | Writes data the a file or returns an error if there is one. |
File Write Bytes functions
Signature | Description |
---|---|
|Write[imut StringSpan filename,imut Span | Writes data the a file or returns an error if there is one. |
|Write[imut String& filename,imut Span | Writes data the a file or returns an error if there is one. |
|Write[imut PathSpan filename,imut Span | Writes data the a file or returns an error if there is one. |
|Write[imut Path &filename,imut Span | Writes data the a file or returns an error if there is one. |