Functions to access generic data files.
10/27/2007
// OpenDataFile flags:
// can specify only one of the following:
const DF_KEYTYPE_STRING := 0x00; // default
const DF_KEYTYPE_INTEGER := 0x01;
CreateDataFile( filespec, flags := DF_KEYTYPE_STRING )
Creates a new data file.
filespec is in normal package descriptor format. 'filename' or '::filename' will create the new data file /data/ds/filename. ':pkgname:filename' will create /data/ds/pkgname/filename.
flags specifies if the keys of the new datafile are strings OR integers.
DataFile Reference. See the DataFile object documentation.
"Error in descriptor"
"An exception occurred"
"Invalid parameter type"
Datafile
OpenDataFile( filespec )
Opens a datafile for access.
filespec is in normal package descriptor format. 'filename' or '::filename' will open the data file /data/ds/filename. ':pkgname:filename' will open /data/ds/pkgname/filename.
DataFile Reference. See the DataFile object documentation.
"Datafile does not exist"
"Error in descriptor"
"An exception occurred"
"Invalid parameter type"
Datafile
UnloadDataFile( filespec )
Unloads a datafile
filespec is in normal package descriptor format. 'filename' or '::filename' will unload the data file /data/ds/filename. ':pkgname:filename' will unload /data/ds/pkgname/filename.
1 on success
"Unable to find data store file"
"Invalid parameter type"
Datafile
ListDataFiles( )
Returns an array of structs containing:
.pkg - name of the package the datafile belongs to
.name - name of the file
.descriptor - :pkg:name
Array of Structs
Datafile