libperun

Class std.io.FileFlags

Synopsis

public  class FileFlags

Class representing file flags. To use this, one must first invoke one of the static methods readable(), writetable() or readwrite(), which returns a FileFlags instance. Then, additional methods may be invoked to set more flags, each setting a flag and then returning the instance again, such that the calls may be chained.

Fields

Constructors

Methods

public int toPosix();

Return the flags as a POSIX open() argument.

public static FileFlags readable();

Return a FileFlags instance indicating a request to read a file.

public static FileFlags writeable();

Return a FileFlags instance indicating a request to write a file.

public static FileFlags readwrite();

Return a FileFlags instance indicating a request to both read and write a file.

public FileFlags createIfNonExistent();

Modify this FileFlags instance to request that a file be created if it does not yet exist.

public FileFlags createOnly();

Modify this FileFlags instance to request that a file only be created, and not opened if it already exists.

public FileFlags truncate();

Modify this FileFlags instance to request that a file be truncated if it already exists (all data within deleted).

public FileFlags append();

Request to append to the file (all writes end up at the end of the file).