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

[ROM Call]
Index=$3D4

[Description]
Check to see if a file can be opened for a given mode without modifying the file.

[Explanation]
FAccess checks to see if the file <I>fileName</I> can be opened for the given mode <I>mode</I> without modifying the
file first. The file, if it exists, must have the same type as <I>typeName</I>. <I>fileName</I> and <I>typeName</I> are normal zero-terminated C strings (i.e. you do not have to tokenize them).
<BR><BR>
<I>mode</I> is the given mode to be checked. This parameter can either be <A HREF="$$LINK(files.h/fileMode)">FM_READ_ACCESS</A> or <A HREF="$$LINK(files.h/fileMode)">FM_WRITE_ACCESS</A>.
<BR><BR>
<I>typeName</I> is a string which gives the type of the file to open. <I>typeName</I> is a normal-zero terminated C string which must contain one to four characters.
<BR><BR>
The value returned by FAccess is one of the following, 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 can be opened in the given 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_NOT_FOUND</TD><TD><I>fileName</I> does not exist.</TD>
</TR>
<TR>
<TD>FS_BAD_NAME</TD><TD><I>fileName</I> is invalid.</TD>
</TR>
</TABLE>

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