File-manipulation routines

FTN95 offers a wide variety of file manipulation routines. Routines which take operating system file handles as arguments must only be used with file handles obtained with one of the file opening routines detailed in this section. The reading and writing routines use a buffer to improve the performance. These buffers are cleared when a file is closed or when a program terminates and returns to the operating system. As a result of this, a file which has been open for writing may give an error (e.g. full disk) as it is closed with CLOSEF@. In all cases where a routine returns an error code, this may be interpreted by calling a routine such as DOSERR@.

 

ATTACH@

Sets the current directory.

CLOSEF@

Closes a file.

CLOSEFD@

Closes and delete a file.

CURDIR@

Gets the current directory.

CURRENT_DIR@

Obsolete routine. Use CURDIR@.

EMPTY@

Clears a file for writing.

ERASE@

Deletes a file.

FEXISTS@

Searches for a file with a given path name or wildcard.

FILE_EXISTS@

Obsolete routine. Use FEXIST@ instead.

FILE_SIZE@

Gets the size of a file in bytes.

FILE_TRUNCATE@

Truncates an open file at its current position.

FILEINFO@

Gets information about a specified file.

FILES@

Obtains directory information.

FPOS@

Repositions a file.

FPOS_EOF@

Moves the file pointer to end-of-file.

GET_FILES@

Gets a list of files in the current working directory.

GET_PATH@

Gets the fully qualified pathname.

MKDIR@

Creates a new DOS directory.

OPENR@

Opens a file for reading.

OPENRW@

Opens a file for reading or writing.

OPENW@

Opens a file for writing.

READF@

Reads binary data from a file.

READFA@

Reads ASCII text from a file.

RENAME@

Renames a file.

RFPOS@

Gets the position of a file.

SET_FILE_ATTRIBUTE@

Sets a file attribute.

SET_SUFFIX@

Changes the extension of a given file name.

SET_SUFFIX1@

Adds an extension to a given file name.

TEMP_FILE@

Provides a unique name for a file.

TEMP_PATH@

Gets a suitable name for a temporary file.

WILDCHECK@

Checks for the matching of a file name with a wild card.

WRITEF@

Writes binary data to a file.

WRITEFA@

Writes a line of data to an ASCII file.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited