AdsGetFileSize
Returns the size in bytes of a file under the data directory.
Harbour-style name: oads_FSize (see Server filesystem).
Syntax
UNSIGNED32 AdsGetFileSize(ADSHANDLE hConnect, UNSIGNED8 *pucName,
UNSIGNED32 *pulSize);
Parameters
| Parameter | Type | Description |
|---|---|---|
hConnect |
ADSHANDLE |
Connection handle (0 = default). |
pucName |
UNSIGNED8* |
Relative file path. |
pulSize |
UNSIGNED32* |
Out: file size in bytes (v1 capped at 4 GiB−1). |
Return Value
AE_SUCCESS (0). AE_NO_FILE_FOUND if not a regular file. AE_INTERNAL_ERROR if size exceeds UNSIGNED32.
Description
For remote connections the size is read on the server.
Example
UNSIGNED32 sz = 0;
AdsGetFileSize(hConn, (UNSIGNED8*)"inbox/hello.txt", &sz);