Defile.writeFile

A convenience function that writes an entire buffer to a file in a single method call.

The method will first open for writing the file specified by filePath, the will call Defile.write to completely write buffer to the file.

struct Defile
static
size_t
writeFile
(
string filePath
,
ubyte[] buffer
)

Parameters

filePath
Type: string

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

buffer
Type: ubyte[]

The bytes that will be written to the file.

Return Value

Type: size_t

The number of bytes written, which should equal buffer.length.

Throws

DefileException if an error occurs.

Meta