Purpose
Returns information about an open file. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
FileAttr( filenum, attribute )
filenum is the number of a file opened through an Open File statement.
attribute is a code indicating which file attribute to return; see table below.
Return Value
LargeInt value
Description
The FileAttr() function returns information about an open file. The attribute parameter must be one of the codes in this table:
attribute parameter | ID | Return Value |
---|---|---|
FILE_ATTR_MODE | 1 | Small integer, indicating the mode in which the file was opened. Return value will be one of the following:
|
FILE_ATTR_FILESIZE | 2 | Integer, indicating the file size in bytes. |
Error Conditions
ERR_FILEMGR_NOTOPEN (366) error is generated if the specified file is not open.
See Also:
EOF() function, Get statement, Open File statement, Put statement