cArquivoFilename or mask.
AdvPL GuideFile( cArquivo, [nWhere], [lChangeCase] ) --> lRetChecks whether a file matches the specified lookup.
File returns a logical result and supports wildcards, so true does not establish exactly one uniquely named file. nWhere selects server or SmartClient lookup, with path-dependent behavior for zero. Documentation excludes hidden/system files and describes JOB limitations for workstation paths. This example uses nWhere=1 and a fictional drive-free name without opening, creating or guaranteeing exclusive access. (TOTVS, n.d., ref. 1)
File( cArquivo, [nWhere], [lChangeCase] ) --> lRetcArquivoFilename or mask.
nWhere0 depends on path; 1 server; 2 SmartClient.
lChangeCaseFilename case handling according to build/configuration.
Logical file lookup result.
#Include "Protheus.ch"
#Include "Fileio.ch"
User Function Ed386()
// Server lookup without assuming the test file exists.
ConOut(cValToChar(File("editorial-test.txt", 1, .F.)))
Return NilTrue or false according to file/context; does not prove write permission. 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.