Defile.write

A wrapper for PHYSFS_write.

Writes data to a file. Note that the file must have been opened with the OpenFor.Write or OpenFor.Append flag set. See the documentation for PHYSFS_write for details.

  1. size_t write(const(ubyte)[] buffer, size_t objSize, size_t objCount)
    struct Defile
    size_t
    write
    (
    const(ubyte)[] buffer
    ,
    size_t objSize
    ,
    size_t objCount
    )
  2. size_t write(const(void)* ptr, size_t objSize, size_t objCount)

Parameters

buffer
Type: const(ubyte)[]

The buffer containing the bytes which will be written to the file.

objSize
Type: size_t

The number of bytes to write at a time.

objCount
Type: size_t

The number of times to write objSize bytes.

Return Value

Type: size_t

The total number of bytes written. Note that this differs from PHYSFS_read, which returns the number of objects written.

Throws

DefileException if an error occurs.

Meta