Skip to main content
Version: Next

OpenOptions

type OpenOptions = object;

Open options.

tip

It is same with std::fs::OpenOptions in rust std library.

See​

RsvimFs.open

Properties​

append?​

optional append?: boolean;

Set the file for append mode.

Default Value​

false ,


create?​

optional create?: boolean;

Create a new file or open it if it already exists.

In order for the file to be created, write or append access must be used.

Default Value​

false ,


createNew?​

optional createNew?: boolean;

Create a new file, failing if it already exists.

If this option is set, create and truncate options are ignored.

Default Value​

false ,


read?​

optional read?: boolean;

Set the file for read access.

Default Value​

false ,


truncate?​

optional truncate?: boolean;

Open the file and truncate the file to 0 length if it already exists.

Default Value​

false ,


write?​

optional write?: boolean;

Set the file for write access. If the file already exists, any "write" calls on it will overwrite the contents, without truncating it.

Default Value​

false ,