Utilities.FileGetAttr Method

Applies to TestComplete 15.47, last modified on January 20, 2023
This method is obsolete. See the Remarks section below.

Description

Use the Utilities.FileGetAttr method to get the attributes of the specified file. To see if an attribute is set, check bits of the resultant value using the following constants (that is, you should combine the resultant value with one of these constants using the and operator):

Attribute Value Description
faReadOnly 1 Read-only file.
faHidden 2 Hidden file.
faSysFile 4 System file.
faVolumeID 8 The file is the volume identifier.
faDirectory 16 Folder or directory.
faArchive 32 The file has been changed since the last backup.

To get the values of several attributes, combine the appropriate constants with the or operator.

Declaration

Utilities.FileGetAttr(FileName)

FileName [in]    Required    String    
Result Integer

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

FileName

Specifies the name and path of the file whose attributes you want to get.

Result Value

The integer value that holds the attributes of the specified file.

Remarks

This method is obsolete. It is supported for backward compatibility only. To get file attributes, use the aqFile.GetFileAttributes or aqFileInfo.Attributes method.

See Also

GetFileAttributes Method
Attributes Property
SetFileAttributes Method
SetFileAttributes Method
FindFiles Method
TSearchRec Object

Highlight search results