CreateDiskFile (open)

Create a file on disk

Syntax

LOADLIB "wh::files.whlib";

INTEGER FUNCTION CreateDiskFile(STRING path, BOOLEAN failifexists, BOOLEAN publicfile)

Parameters

STRING path

Path to the file to create.

BOOLEAN failifexists

Fail if the file already exists?

BOOLEAN publicfile

If the file is created, should it be publicly readable?

Return value

INTEGER

ID of open file, or 0 if file creation failed

Description

Create a new file, or open an existing file. Remember that you may want to truncate the file if it already exists by using SetDiskFilelength(fileid,0)