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.19
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 |
Vorume
|
FC_HIDDEN |
Hidden
|
FC_NORMAL |
Visible
|
FC_SYSTEM |
System
|
Constant | Description |
---|
FC_ARCHIVED |
Archived file
|
FC_HIDDEN |
Hidden file
|
FC_NORMAL |
Normal read/write file
|
FC_READONLY |
Read-only file
|
FC_SYSTEM |
System file
|
Tip |
---|
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