cFileNameComplete test path in the execution context.
AdvPL GuideFWFileIOBase():New(cFileName, [nBuffer])Centralizes file operations and diagnostics.
The base class groups opening, closure, existence, creation and deletion. New takes a complete path; nBuffer is documented from LIB 20201009. Open uses Fileio.ch modes and error returns a diagnostic object. clear deletes and can recreate the file rather than merely clearing memory. This example only prepares a constructor callback without file operations. (Sources: refs. 1–1.)
FWFileIOBase():New(cFileName, [nBuffer])cFileNameComplete test path in the execution context.
nBufferBuffer size; LIB 20201009+.
FWFileIOBase():New(cFileName, [nBuffer])o:Open([nMode]) / o:Close()o:Error()o:Clear(lCreate) / o:Erase()#Include "Protheus.ch"
User Function Ed421()
Local bPrepare := {|cPath| FWFileIOBase():New(cPath)}
// Do not evaluate: supply a complete test path.
Return NilConstructor wrapped in a block without file access. 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.