cDirValidated test path.
AdvPL GuideFWDirRemove(cDir, [lComplete], [lKillFiles]) --> lRetRemoves directories under explicit options.
Removes the last level or empty path under lComplete. lKillFiles allows recursive deletion in the requested tree; this is not a neutral directory lookup. The example keeps additional destructive options false and never evaluates the block. No directory is removed. (Sources: refs. 1–1.)
FWDirRemove(cDir, [lComplete], [lKillFiles]) --> lRetcDirValidated test path.
lCompleteRemoves the entire empty path when true.
lKillFilesAllows deletion of files and the requested subtree.
Logical success.
#Include "Protheus.ch"
User Function Ed418()
Local bAction := {|cPath| FWDirRemove(cPath,.F.,.F.)}
// Do not evaluate: check path and ownership first.
Return NilPrepared callback; filesystem unchanged. 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.