FType Function (ROM Call 0x3E6)

AMS 2.00 or higher files.h

unsigned short FType (const char *fileName, char *buf);

Gives the type of a specified file.

FType writes the type of the file fileName into the buffer buf as a zero-terminated string. The buffer should be a least 5 bytes long (four bytes + a zero terminating byte). fileName file must not be opened for write mode.

FType can return one of the following values as enumerated in the FileStatusEnum enum:
FS_OKFtype successfully wrote the type of the file into buf.
FS_ERRORAn error occured while opening the file, or the file was opened successfully, but the type field is invalid.
FS_BAD_NAMEfileName is invalid.

Note that FType will always fail if the given file is already opened for write mode.


Uses: FOpen, HToESI, ROM Call 0x3E8


See also: FOpen