FAttrib Function | |
Determine the attributes of the file found after FFCount(), FFirst(), or FNext().
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION FAttrib() AS DWORD
public static uint FAttrib()
Request Example
View SourceReturn Value
Type:
DWord
A value indicating the attributes of the current file.
The constants in the following table can be used individually or added together to determine which attributes are applicable:
Constant Description
FA_DIRECTORY Directory
FA_VOLUME Volume
FC_ARCHIVED Archived
FC_HIDDEN Hidden
FC_NORMAL Read/write
FC_READONLY Read-only
FC_SYSTEM System
Note:
It is not uncommon for a file to have more than one attribute.
For example, it may be read-only and archived, which would be represented as FC_READONLY + FC_ARCHIVED or _Or(FC_READONLY, FC_ARCHIVED).
Remarks
Since FFCount() and FFirst() cannot distinguish files based on their read and archive attributes, FAttrib() can be useful in determining these attributes.
For example, if FAttrib() returns FC_NORMAL, you know that the current file is read/write and not archived, and if it is FC_ARCHIVED (or FC_NORMAL + FC_ARCHIVED), you know the file is read/write and archived.
Examples
This example uses FAttrib() in conjunction with FFirst() and FNext():
1
2? FFirst("docu*.txt", FC_NORMAL)
3? FAttrib()
4? FNext()
5? FAttrib()
6
See Also