Class std.io.File
Synopsis
public class File extends IOStream, Seekable
An I/O stream representing files.
Fields
Constructors
public File(int fd);
POSIX-specific constructor: make an object referring to a specific file descriptor. When the file is closed, the descriptor is too.
Methods
Open a file.
Arguments
filename | Path to the file. |
---|---|
flags | File open flags (see FileFlags for more info). |
Returns
A File
instance referring to the file which was opened.
Throws
std.io.IOError | If the file cannot be opened with the specified flags. |
---|
protected int readBytes(byte_t[] bytes);
No description given
protected void writeBytes(byte_t[] bytes);
No description given
public void seek(long pos);
No description given
public long tell();
No description given
public void seekToEnd();
No description given
public void close();
Close the file.
public int getFD();
Return the file descriptor (Posix only).