Back to product page

Attributes callback


Called when wodSFTP retrieves file or directory attributes.

Syntax

  • C
void (*Attributes)(void *Sftp, __int64 Size, long Uid, long Gid, long Permissions, DATE AccessTime, DATE ModificationTime);
The Attributes(void *Sftp,__int64 Size,long Uid,long Gid,long Permissions,DATE AccessTime,DATE ModificationTime) syntax has these parts:
void *SftpHandle of the created Sftp instance.
__int64 SizeSize of the file/directory.
long UidUser ownership for the file/directory.
long GidGroup ownership for the file/directory.
long PermissionsInformation about user/group rights.
DATE AccessTimeDetermines the last access time for the file/directory.
DATE ModificationTimeDetermines the last modification time for the file/directory.

Remarks

This callback is called as a result of the GetAttributes method. Once the server returns information about the requested file/directory, it will be parsed by wodSFTP and provided using this callback.

Permissions are defined by the POSIX standard. For a brief description, please refer to the GetAttributes help page.

If you are unfamiliar with representing dates with double type, you can convert AccessTime and ModificationTime to SYSTEMTIME structure using VariantTimeToSystemTime API.

NOTE: this callback is called only if you have created an instance of the SftpEventsStruct structure, and set its Attributes member to the function implementing it.

Platforms

Windows