FileAttr function (LotusScript® Language)
Returns the access type, or the operating system file handle, for an open file.
Syntax
FileAttr ( fileNumber , attribute )
Elements
fileNumber
The number associated with the file when you opened it.
attribute
A number (either 1 or 2) specifying the type of information you want. Instead of 1 or 2, you can specify the constant ATTR_MODE or ATTR_HANDLE, respectively. These constants are defined in the file lsconst.lss. Including this file in your script allows you to use constants instead of their numeric values.
Return value
If attribute is ATTR_HANDLE, then FileAttr returns the operating system file handle for the file.
If attribute is ATTR_MODE, then FileAttr returns an integer representing the access for the file, as shown in the following table.
Return value |
Access |
Constant |
---|---|---|
1 |
Input |
ATTR_INPUT |
2 |
Output |
ATTR_OUTPUT |
4 |
Random |
ATTR_RANDOM |
8 |
Append |
ATTR_APPEND |
32 |
Binary |
ATTR_BINARY |