Multiplayer Interactive-Fiction Game-Design Blog



Download 8.87 Mb.
Page140/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   136   137   138   139   140   141   142   143   ...   151

Functions

BinaryDataEnum


Enumerates all the files in the database.

Enumerates all the files in the database.



Parameter Name

Description

FileNamePrefix

If this is a string then only those files beginning with FileNamePrefix will be enumerated. If NULL then all files will be enumerated.

Return value description

If successful, a list of file names (in no particular order). If it fails then it returns NULL.


BinaryDataGetNum


Returns the name of a file in the binary database, based upon the index number.

Returns the name of a file in the binary database, based upon the index number.



Parameter Name

Description

Index

Index number, from 0 .. BinaryDataNum()-1.

Return value description

String for the file name, or NULL if error.


BinaryDataLoad


Loads a binary file from the database.

Loads a binary file from the database.



Parameter Name

Description

FileName

File name to load.

Return value description

If successful, this returns a string with the binary data. The values of the string are all 1 more than the original data. Therefore, String[N] = OriginalData[N]+1.

Returns NULL if error.




BinaryDataNum


Returns the number of files in the database.

Returns the number of files in the database.



Parameter Name

Description

Return value description

Returns the number of files in the database.


BinaryDataQuery


Returns information about the file in the binary database.

Returns information about the file in the binary database.



Parameter Name

Description

FileName

File name to load.

Return value description

If this fails, returns NULL.

If successful, returns a list with [FileSize, CreationDate, LastModify, LastAccess]. FileSize is the size of the file in bytes. CreationDate is the date/time when the file was created. LastModify is the last modification date/time. LastAccess is the last access date/time, although this value is unreliable since it isn't always written out.




BinaryDataRefresh


Sends a message to all connected clients saying that database file has changed.

Calling this function sends a message to all connected clients letting them know that the database file has changed and they should reaload it.



Parameter Name

Description

FileName

The file that has been changed. This will have recently been written to BinaryDataSave()

Return value description

None


BinARYdATArEMOVE


Deletes binary data from the binary database.

Deletes binary data from the binary database.



Parameter Name

Description

FileName

File name to delete

Return value description

TRUE if the file was found and deleted, FALSE if it could not be found.


BinaryDataRename


Renames a file in the binary database.

Renames a file in the binary database.



Parameter Name

Description

FileName

File name to rename.

RenameTo

Name to rename it to. If the file already exists then the rename call will fail.

Return value description

TRUE if the file was found and renamed, FALSE if it could not be found or if RenameTo already exists.



Download 8.87 Mb.

Share with your friends:
1   ...   136   137   138   139   140   141   142   143   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page