GetFAttr Function (String) | |
Convert file attributes to numbers.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION GetFAttr(
uAttributes AS STRING
) AS DWORD
public static uint GetFAttr(
string uAttributes
)
Request Example
View SourceParameters
- uAttributes
- Type: String
One or more of the following constants or strings:
Character Constant Description
A FC_ARCHIVED Archived
D FA_DIRECTORY Directory
H FC_HIDDEN Hidden
NULL_STRING FC_NORMAL Read/write
R FC_READONLY Read-only
S FC_SYSTEM System
V FA_VOLUME Search for the DOS volume label and exclude all other files
To specify more than one constant, you can either add attributes together, as in FC_SYSTEM + FC_HIDDEN, or use the _Or() operator, as in _Or(FC_SYSTEM, FC_HIDDEN).
To specify more than one string, simply concatenate them, as in "SH."
Return Value
Type:
DWord
A number that represents the file attribute specified.
This number could represent two or more file attributes added together.
Remarks Examples
This example uses GetFAttr() to return file attributes as a number:
1? GetFAttr(FA_DIRECTORY)
2? GetFAttr(FC_ARCHIVED + FC_READONLY)
3? GetFAttr("AR")
4
5
6? FFirst("*.txt", GetFAttr("H"))
See Also