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

[ROM Call]
Index=$3E6

[Description]
Gives the type of a specified file.

[Explanation]
FType writes the type of the file <I>fileName</I> into the buffer <I>buf</I> as a zero-terminated string. 
The buffer should be a least 5 bytes long (four bytes + a zero terminating byte). <I>fileName</I> file must not be opened for write mode.
<BR><BR>
FType can return one of the following values as enumerated in the <A HREF="$$LINK(files.h/FileStatusEnum)">FileStatusEnum</A> enum:
<TABLE BORDER CELLPADDING="3">
<TR>
<TD>FS_OK</TD><TD>Ftype successfully wrote the type of the file into <I>buf</I>.</TD>
</TR>
<TR>
<TD>FS_ERROR</TD><TD>An error occured while opening the file, or the file was opened successfully, but the type field is invalid.</TD>
</TR>
<TR>
<TD>FS_BAD_NAME</TD><TD><I>fileName</I> is invalid.</TD>
</TR>
</TABLE>
<BR>
Note that FType will always fail if the given file is already opened for write mode.

[References]
Out=files.h/TIOS_FOpen: FOpen, estack.h/HToESI, unknown.h/_ROM_CALL_3E8
Out_EV_eventLoop=1
