Defile.open

A wrapper for PHYSFS_openRead, PHYSFS_openWrite, and PHYSFS_openAppend.

A file must be opened before any operations can be performed on it. Failure to do so should be considered undefined behavior, but will most likely result in exceptions being thrown.

See the documentation for PHYSFS_openRead, PHYSFS_openWrite and PHYSFS_openAppend for more details.

struct Defile
void
open
(
string fileName
,
OpenFor ofor
)

Parameters

fileName
Type: string

The relative path to the file in the virtual file system.

ofor
Type: OpenFor

The usage for which the file will be opened, one of OpenFor.Read, OpenFor.Write, or OpenFor.Append.

Throws

DefileException if the file could not be opened.

Meta