 |
FCreate |
Function (ROM Call 0x3D6) |
Create an empty file.
FCreate creates an empty file with the name fileName and the type typeName. It is normally only needed if multiple files must be
simultaneously opened in write mode. Filename is not a tokenized variable name (as required by the symbol
table code) but rather a normal zero-terminated C string of characters. It must not be a reserved
name. If filename does not contain a folder name, the file will be stored in
the current folder. Internally, files are stored as custom (third-party) data type files
(i.e. they are defined with the OTH_TAG). They will show up to the user in the VAR-LINK screen
as the type specified when the FILE was opened (up to four letters).
typeName must point to a normal zero-terminated C string of at most four characters which
describes the file type (FS_ERROR is returned if it does not).
FCreate returns one of the following values, as described in the FileStatusEnum enum:
FS_OK | The file was opened for the specified mode. |
FS_ERROR | The file cannot be opened for the specified mode. (It may be locked or not of custom (OTH) data-type.) |
FS_BAD_NAME | fileName is invalid. |
FS_MEMORY | Not enough memory. |
Uses: FClose, FOpen
See also: FClose, FOpen