BBjFileInfo::getFileType

Description

In BBj 6.0 and higher, this method returns the file type from a BBjFileInfo object.

Syntax

Return Value

Method

int

getFileType()

Parameters

None.

Return Value

Returns the file type from the following table:

0x00

INDEXED_FILE

0x01

SERIAL_FILE

0x02

DIRECT_FILE

0x03

STRING_FILE

0x04

BBX_PROGRAM_FILE

0x84

BBJ_PROGRAM_FILE

0x05

DIRECTORY_FILE

0x06

MKEYED_FILE

0x80

MKEYED_4GIG

0x40

MKEYED_RECOVERABLE

0x20

MKEYED_64BIT

0x08

XKEYED_FILE

0x0B

JKEYED_FILE (Deprecated)

0x0D

VKEYED_FILE

Remarks

None.

Example

rem ' Query basic information about a file

filename$ = "Sample.dat"
erase filename$,err=*next
mkeyed filename$,[1:1:6]+[2:1:3],[3:1:2],0,64
channel = unt
open (channel)filename$
BBjFileInfo! = BBjAPI().getFileSystem().getFileInfo(channel)
print "File Name         : ",BBjFileInfo!.getFilename()
print "File Type         : ",hta(chr(BBjFileInfo!.getFileType()))
print "File Size         :",BBjFileInfo!.getFileSize()
print "Last Modified Date: ",new java.util.Date(BBjFileInfo!.getLastModified())
print "Key Size          :",BBjFileInfo!.getKeySize()
print "Record Size       :",BBjFileInfo!.getRecordSize()
print "Defined Records   :",BBjFileInfo!.getDefinedRecords()
print "Current Records   :",BBjFileInfo!.getCurrentRecords()
print "Current Key Number:",BBjFileInfo!.getCurrentKeyNumber()
end

See Also

BBjAPI

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