Appendix A: System Routines — Files
557
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
FAccess
Declaration:
WORD
FAccess
(char *
fileName
, WORD
mode
, char *
typeName
)
Category(ies):
Files
Description:
Check to see if a file can be opened for a given mode without modifying the
file. The file, if it exists, must have the same type as
typeName
.
Inputs:
fileName
— String name of file to check.
mode
— FM_READ_ACCESS or FM_WRITE_ACCESS.
typeName
— 1 . . . 4 character string of file type.
Outputs:
FS_OK — The file can be opened in the given mode.
FS_ERROR — The file cannot be opened for the specified mode
(may be locked or is not a third-party data-type).
FS_NOT_FOUND —
fileName
does not exist.
FS_BAD_NAME —
fileName
is invalid.
Assumptions:
The file, if it exists, must have the same type as
typeName.
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: FOpen, FCreate
Example:
if (FS_ERROR == FAccess("ZTEMP", FM_WRITE_ACCESS, "TYPE")) {
Disp("ERROR: Can not write to data file");
return;
}