System.IOUtils.TPath.GetAttributes
Delphi
class function GetAttributes(const Path: string; FollowLink: Boolean = True): TFileAttributes; inline; static;
C++
static TFileAttributes __fastcall GetAttributes(const System::UnicodeString Path, bool FollowLink = true);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TPath |
Description
Returns the file or directory attributes.
Call GetAttributes to obtain the attributes of a given file or directory. The return value of GetAttributes is a set of TFileAttribute values; each value of the set represents a file attribute.
The following table lists the parameters expected by this method:
Name | Meaning |
---|---|
Path |
The path to the file or directory for which the attributes are obtained. |
FollowLink |
Specifies whether the symbolic link is used. |
Note: GetAttributes raises an exception if the file or directory cannot be accessed or the path is invalid.
Note: If the Path parameter is a symbolic link and the FollowLink parameter is set to True, the method is performed on the target file (or directory). If the first condition is True, but the FollowLink parameter is set to False, the method will be performed on the symbolic link. If the link is broken, the method will always return False.