FAttr2String Function | |
Display file attributes as a string.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
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 Returns
FA_DIRECTORY D
FA_VOLUME V
FC_ARCHIVED A
FC_HIDDEN H
FC_NORMAL NULL_STRING
FC_READONLY R
FC_SYSTEM S
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