Contents · Forum Home · StreamSec Tools 4.1.5.364 documentation

methodiSFTPClientTransport.Stat

function Stat(const aPath : string; const aFlags: tValidFileAttrFlags5 = []) : iFileAttributes;
Retrieves the attributes of a path, following a final symbolic link. On version-4+ servers aFlags selects which attribute groups to return; it is ignored on version 3. A server may answer with a status instead of the attributes, which the drafts allow ("either SSH_FXP_ATTRS or SSH_FXP_STATUS"): an error status raises eSFTPStatusError, while SSH_FX_OK and SSH_FX_EOF are no errors and the result is then nil, so test it before reading a field.