file_attributes(fname, attr);
Argument | Description |
---|---|
fname | The name of the file to check. |
attr | The attributes to check for. |
Boolean.
You can use this function to check the attributes of a given file. You can add up the following constants to see the type of files you want:
- fa_readonly - read-only files
- fa_hidden - hidden files
- fa_sysfile - system files
- fa_volumeid - volume-id files
- fa_directory - directories
- fa_archive - archived files
NOTE: This is a Windows only function.
if !file_attributes(file, fa_hidden)
{
file_delete(file);
}
This would check a file to see if it is hidden or not, and if not it is deleted.