
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_fileattr()
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
C_FILEATTR()
DESCRIPTION
C_FILEATTR() allows the attributes on a file to be read and
changed. C_FILEATTR() reads the attributes for read-only, hidden,
system, archive, and directory and sets the attributes for read-
only, hidden, system, and archive.
NOTES
To change the file attributes include the attr parameter, and to
read the attributes omit the attr parameter.
SYNTAX
C_FILEATTR(filename [,attr])
PARAMETERS
filename (C) is the full name of the file to get or set the attributes.
attr (C) is a character string containing the new attributes to set
for the specified file. Any attribute can be specified in the
string, but each must be separated by a front slash "/"
("-R/+H/+A"). If attr is not specified, C_FILEATTR() returns the
current file attributes. The attributes and definitions are as
follows:
ATTRIBUTES DEFINITION
---------- ----------
+R Read Only On
-R Read Only Off
+H Hidden On
-H Hidden Off
+S System File On
-S System File Off
+A Archive On
-A Archive Off
+D Directory On (only a return value)
RETURNS
C_FILEATTR() returns a character string containing the attributes
set for the specified file (as shown in the table above), if the
attribute parameter was not specified. If the attribute parameter
is specified (to set the attributes), there is no return value.
EXAMPLES
&& Just returns current attributes read-only, hidden, and system
? c_fileattr("FILE.SYS") --> R/H/S
&& Sets the read-only, hidden, and system attributes off and sets
&& the archive bit on.
c_fileattr("FILE.SYS","-R/-H/-S/+A")
See Also: C_FILEINFO() C_FILEDATE() C_FILETIME() C_FINDFILE()
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson