[Main]
Name=FCreate
Type=Function
Subtype=ROM Call
Header Files=files.h
Definition=unsigned short FCreate (const char *fileName, const char *typeName);
MinAMS=2.00
See Also=files.h/TIOS_FClose: FClose, files.h/TIOS_FOpen: FOpen

[ROM Call]
Index=$3D6

[Description]
Create an empty file.

[Explanation]
FCreate creates an empty file with the name <I>fileName</I> and the type <I>typeName</I>. It is normally only needed if multiple files must be
simultaneously opened in write mode. <I>Filename</I> 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 <I>filename</I> 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 <A HREF="$$LINK(estack.h/Tags)">OTH_TAG</A>). 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).
<BR><BR>
<I>typeName</I> must point to a normal zero-terminated C string of at most four characters which
describes the file type (<A HREF="$$LINK(files.h/FileStatusEnum)">FS_ERROR</A> is returned if it does not).
<BR><BR>
FCreate returns one of the following values, as described in the <A HREF="$$LINK(files.h/FileStatusEnum)">FileStatusEnum</A> enum:
<TABLE BORDER CELLPADDING="3">
<TR>
<TD>FS_OK</TD><TD>The file was opened for the specified mode.</TD>
</TR>
<TR>
<TD>FS_ERROR</TD><TD>The file cannot be opened for the specified mode. (It may be locked or not of custom (OTH) data-type.)</TD>
</TR>
<TR>
<TD>FS_BAD_NAME</TD><TD><I>fileName</I> is invalid.</TD>
</TR>
<TR>
<TD>FS_MEMORY</TD><TD>Not enough memory.</TD>
</TR>
</TABLE>

[References]
Out=files.h/TIOS_FClose: FClose, files.h/TIOS_FOpen: FOpen
Out_EV_eventLoop=1
