☰
fileio
🌌fuzion.std.fileio
Closes an IO source using an i64 representing the source handler (file descriptor)
returns outcome unit in case of success and an error in case of failure
returns outcome unit in case of success and an error in case of failure
intrinsic that returns TRUE in case of success or FALSE in case of failure during dir creation
creates a directory using the specified path
parent directories in the path should exist otherwise, no creation will take place and an error will be the outcome
parent directories in the path should exist otherwise, no creation will take place and an error will be the outcome
intrinsic that deletes the file/dir represented by the path returning TRUE in case of success
and FALSE in case of failure
and FALSE in case of failure
deletes the file/dir found in the path
returns unit as outcome in case of successful deletion and error in case of failure
if the targeted dir has content, then the return value will be error and the deletion will not take place
returns unit as outcome in case of successful deletion and error in case of failure
if the targeted dir has content, then the return value will be error and the deletion will not take place
intrinsic that fills a Fuzion object with the current file stream position
and the error number from C back-end/ -1 in the interpreter
and the error number from C back-end/ -1 in the interpreter
returns the current file-pointer offset as an outcome i64,
the offset is measured from the beginning of the file indicated by the file descriptor
returns the current offset in success and error in failure
the offset is measured from the beginning of the file indicated by the file descriptor
returns the current offset in success and error in failure
intrinsic that returns the file size in bytes or -1 in case of an error
retrieves the file size in bytes and returns an outcome of error in case of an error
intrinsic that fills an array with some metadata of the file/dir provided by the path
returns TRUE in case the operation was successful and FALSE in case of failure
in case the path refers to a symbolic link it does not attempt to follow it and returns info about the link itself
returns TRUE in case the operation was successful and FALSE in case of failure
in case the path refers to a symbolic link it does not attempt to follow it and returns info about the link itself
moves file/dir from an old path to a the new path
can rename the file/dir as well by changing the name of the old file/dir to a new name in the new_path
returns a unit type as outcome in case of success and error in case of failure
can rename the file/dir as well by changing the name of the old file/dir to a new name in the new_path
returns a unit type as outcome in case of success and error in case of failure
intrinsic that returns TRUE in case the move was successful and FALSE in case not
Opens an IO source using a Fuzion Any as path and an i8 flag to represent the opening method (Read: 0, Write: 1, Append: 2)
returns outcome i64 representing the file descriptor in success
returns an error in failure
returns outcome i64 representing the file descriptor in success
returns an error in failure
intrinsic that fills a Fuzion object with the file descriptor and the error number from C back-end/ -1 in the interpreter
after opening the source represented by the path parameter
after opening the source represented by the path parameter
reads n bytes of a file opened as fd
in case the outcome is an array, it may be shorter than n. this means the end of file
has been reached.
in case the outcome is an array, it may be shorter than n. this means the end of file
has been reached.
intrinsic that fills an array u8 with the file bytes that is represented by the file descriptor
returns i8 0 in case of success and the error number/ -1 for the interpreter in case of failure
returns i8 0 in case of success and the error number/ -1 for the interpreter in case of failure
seek offset in the stream represented by fd
returns an outcome i64 that represents the new offset
returns an error in case of failure
returns an outcome i64 that represents the new offset
returns an error in case of failure
intrinsic to set the file-pointer offset at which the next read or write occurs
the offset is measured from the beginning of the file indicated by the file descriptor
and fills a Fuzion object with the new offset
and the error number from the C back-end/ -1 in the interpreter
the offset is measured from the beginning of the file indicated by the file descriptor
and fills a Fuzion object with the new offset
and the error number from the C back-end/ -1 in the interpreter
intrinsic that fills an array with some metadata of the file/dir provided by the path
returns TRUE in case the operation was successful and FALSE in case of failure
in case the path refers to a symbolic link it resolves it and returns info about the actual file
returns TRUE in case the operation was successful and FALSE in case of failure
in case the path refers to a symbolic link it resolves it and returns info about the actual file
creates a new file using an array of u8 as content and a string as the file path
it overwrites the file, if it exists, or creates a new one if it does not exist
if the director(y/ies) in the path d(oes/o) not exist, or an error happens during the writing operation an error will be returned
in case of success a unit type will be the outcome
it overwrites the file, if it exists, or creates a new one if it does not exist
if the director(y/ies) in the path d(oes/o) not exist, or an error happens during the writing operation an error will be returned
in case of success a unit type will be the outcome
returns an i8 to represent the result of the operation
0 in case no errors occurred and the error number in case the operation failed in the C back-end/ -1 in the interpreter