| files.h | Header File

Header File Index

Routines for accessing files (needs AMS 2.00 or later)

This set of routines (available only in AMS 2.00 or later) gives the possibility of managing custom type files.
They give a 'higher' level way for managing custom type symbols in the Variable Allocation Table than the routines in vat.h.
They can in any case be used in conjunction with the vat.h routines.
However, files.h routines are different from the file routines contained in stdio.h. First of all, they do not use the same files structures. Moreover, stdio.h file functions are TIGCC library functions working with any AMS versions while files.h functions are AMS (TIOS) functions which are only available under AMS 2.00 and later. They do have the advantage of not requiring extra code in your program, unlike stdio.h.
Therefore the following routines must never be used with stdio.h file routines for the same file stream at the same time.

Functions

FAccess
  Check to see if a file can be opened for a given mode without modifying the file.
FClose
  Close a file.
FCreate
  Create an empty file.
FDelete
  Deletes a file.
FEof
  Returns TRUE if a file is at the end.
FFindFirst
  Find the first file of a given type.
FFindNext
  Find the next symbol as set up by a call to FFindFirst.
FGetC
  Read a byte from an open file.
FGetPos
  Return the current file position.
FGetSize
  Return the number of bytes currently stored in an opened file.
FOpen
  Open a file for a specific mode.
FPutC
  Write a byte to a file opened in write mode.
FRead
  Read a given number of bytes from an open file.
FSetBufSize
  Set the buffer size of a file.
FSetPos
  Set the position of the next read or write for an opened file.
FSetSize
  Truncate the size of a file opened in write mode.
FSetVer
  Change the version number of an opened file.
FStatus
  Return the status of a file.
FType
  Gives the type of a specified file.
FWrite
  Write a specified number of bytes to a file.

Predefined Types

fileMode
  An enumeration for describing possible file modes.
FILES
  A structure for defining a file.
FileStatusEnum
  An enumeration for describing possible file statuses.
FindOptions
  Describes options for SymFindFirst and FFindFirst.
HSym
  A structure representing a symbol reference.
SYM_ENTRY
  A structure representing a VAT symbol entry.

See also: stdio.h, vat.h