FATS - Fast Access Tree System
Table of Contents
List of Commands
"K" Close Indexfile

"K" Close Indexfile


Command string:

CMND$ = "K\{FileNo}"

FileNo File number

or closing all files:

CMND$ = "K[\0]"

Purpose:

Releases a index file from availability.

Description:

This command closes the index file with the specified file number.

If you have activated the cache algorithm with the command  Auto Refresh (Y), the possibly still in the cache buffers presented data are automatically written on the disk.

If the cache is inactive after every FATS command all changed data are written on the disk. Therefore closing of a file is necessary only before terminating the application.

If you omit the parameter "FileNo", then all opened index files are closed. This version is recommended before the termination of the application program.

Parameters returned:

ERRORCODE:Errorcode or 0 (no error)
RECNO:Undefined
FATSKEY:Undefined

Example:

Close the index file 1:

CMND$ = "K\1"

Close all index files:

CMND$ = "K"

 BASIC Example
 Pascal Example
 C Example

See also:

 "O" Open Indexfile; page 4-77
 "C" Create Indexfile; page 4-18


 

© 2008  GCS Software, Udo Gertz