cDirEspDirectory and search mask.
AdvPL GuideDirectory( cDirEsp, [cAtributos], [uParam1], [lConvertCase], [nTypeOrder] ) --> aRetLists directory entries in an array.
Directory returns name, size, date, time and attributes per entry. Drive notation distinguishes workstation and server in TOTVS examples; SmartClient HTML requires WebAgent according to the page warning. The 10,000-entry limit and :N attribute paging depend on the documented build. The public example lists C:\TEMP; this adaptation only prepares a test-server-directory listing without printing filenames. An empty list does not prove authorization or existence. (TOTVS, n.d., ref. 1)
Directory( cDirEsp, [cAtributos], [uParam1], [lConvertCase], [nTypeOrder] ) --> aRetcDirEspDirectory and search mask.
cAtributosSelection attributes; D includes directories.
uParam1Compatibility; do not supply.
lConvertCaseTrue uppercases names.
nTypeOrderBuild-dependent ordering: name, date or size.
Array of entries with five positions per item.
#Include "Protheus.ch"
User Function Ed352()
Local bList := {|| Directory("/editorial/*.*", "D")}
// Pre-existing test directory; callback is not invoked.
Return NilAction prepared without querying the filesystem. 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.