FAttr2String Function | |
Display file attributes as a string.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION FAttr2String(
dwAttributes AS DWORD
) AS STRING
public static string FAttr2String(
uint dwAttributes
)
Request Example
View SourceParameters
- dwAttributes
- Type: DWord
One or more of the following constants, indicating the file attribute(s) to return (file attributes are returned by FAttrib()):
Constant | Description |
---|
FA_DIRECTORY |
Directory
|
FA_VOLUME |
Vorume
|
FC_HIDDEN |
Hidden
|
FC_NORMAL |
Visible
|
FC_SYSTEM |
System
|
Return Value
Type:
String
One or more of the characters indicated in the table above, depending upon what file attribute constants were specified in
dwAttributes.
If multiple attributes are present, the characters are concatenated as a string. You can use the string search function, At(), to determine if
a particular property is set (see example below).
Remarks Examples
This examples shows the return values from FAttr2String():
1? FAttr2String(FC_HIDDEN)
2? FAttr2String(FC_HIDDEN + FC_SYSTEM)
This example uses FAttr2String() to find out if the file named ABC.DBF is a read-only file:
1FFirst("abc.dbf", FC_NORMAL)
2IF At(FAttr2String(FAttrib()), "R") > 0
3
4ENDIF
See Also