File_Attrib(1,2,3)
PURPOSE
This function will change or read file attributes (like attrib does)
PARTS
1 c Required - What to do ether FAGet or FASet to Find out what the attributes are or to change the attribute
2 f/c/e required - Filename to Check or Change. |
3 f/c/e Required for FASet only. This is an Alpha with what you want to do:
-R = Remove Read-only
+R = Add to Read-only
-A = Remove Archive
+A = Add Archive
-H = Remove hidden
+H = Add hidden
-S = remove System
+S = Add System
Note :These can be added together to change multi attribute at once (i.e. "-R-H-S+A") |
RETURN TYPE – Varies
FAGet - Returns a String of which attribute are Active:
A if Archive bit is set
R if Read-only bit is set
H if Hidden bit is set
S if System bit is set
D if Directory bit is set
FASet – Returns .T. if the attribute was change and .F. if there was a problem changing it.
EXAMPLE
//(reading Attribute)
Define s type a size 5
S = file_attrib(FAGet,'tasruntime.exe')
// s = 'A'
// (Change Attribute)
Define S type a size 10
Define L type L
S = '+r+A-h-s'
L = file_attrib(faSet,'tasruntime.exe',s)
// L = .t. // This might not work because tasruntime would be running. |
NOTE: The special alpha constants above (FASet and FAGet) are defined in COMPILERCONSTANTS.TXT.
Page url: http://www.cassoftware.com/tas/manual/file_attrib().htm