nDriveHistorical drive: 1=A, 2=B, 3=C; default 0 has a documented caveat.
AdvPL GuideDiskSpace( [nDrive] ) --> nBytesFreeDiscontinued reference for free space on a Windows workstation.
TOTVS marks DiskSpace as unsupported or discontinued. The historical function measures a Windows SmartClient workstation drive rather than AppServer disk. The page states that default zero returns -1 and interface-free JOB execution also returns -1; DiskSpace() is therefore not a universal measurement. The example only prepares an explicit-drive call. Bytes depend on the environment and -1 indicates failure, not negative space. (TOTVS, n.d., ref. 1)
DiskSpace( [nDrive] ) --> nBytesFreenDriveHistorical drive: 1=A, 2=B, 3=C; default 0 has a documented caveat.
Free bytes; -1 on failure under the historical reference.
#Include "Protheus.ch"
User Function Ed355()
Local bMeasure := {|| DiskSpace(3)}
// Legacy call prepared without querying workstation drive C:.
Return NilBlock prepared without measurement; no fixed size is expected. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.