BBjFileInfo

Description

In BBj 6.0 and higher, the BBjFileInfo object provides methods to interact with an open file channel.

Creation

BBjAPI > BBjFileSystem > BBjFileInfo

The BBjFileInfo object is created using the following BBjFileSystem method:

Return Value

Method

BBjFileInfo

getFileInfo(int channel)

Methods of BBjFileInfo

Return Value

Method

void

addKey(int keynum, BBjKeyInfo keyinfo)

void

addKey(string keyname, BBjKeyInfo keyinfo)

void

changeKey(int keynum, BBjKeyInfo keyinfo)

void

changeKey(string keyname, BBjKeyInfo keyinfo)

void

dropKey(int keynum)

void

dropKey(string keyname)

string

getCurrentKeyName()

int

getCurrentKeyNumber()

long

getCurrentRecords()

long

getDefinedRecords()

string

getFilename()

long

getFileSize()

int

getFileType()

BBjVector

getKeyInfo()

BBjKeyInfo

getKeyInfo(int keynum)

BBjKeyInfo

getKeyInfo(string keyname)

string

getKeyName(int keynum)

int

getKeyNumber(string keyname)

int

getKeySize()

long

getLastModified()

int

getRecordSize()

string

getText()

void

lock()

void

setKeyName(int keynum, string keyname)

void

setKeyName(string oldname, string newname)

void

setText(string text)

void

unlock()

Remarks

None.

Example

rem ' Obtain the instance of the BBjFileSystem object

BBjFileSystem! = BBjAPI().getFileSystem()

rem ' Open a file
CHANNEL = UNT
OPEN (CHANNEL)"config.bbx"

rem ' Create a BBjFileInfo object linked to an open file channel
BBjFileInfo! = BBjFileSystem!.getFileInfo(CHANNEL)

See Also

BBjAPI

BBj Object Variables

BBj Object Assignment

BBj Object Error Handling

BBj Object Operators

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.