FTPGetCurDir
FTPGetCurDir() --> cDiretorioGets the current FTP-session directory.
Overview
The historical reference documents a character result without a detailed error contract. The path belongs to the remote server and may reflect a user virtual root. Reading it proves neither read/write permissions nor directory creation. The example prepares an uninvoked callback. The caller must own the test FTP session and its paths; no server or credentials are embedded. (Sources: refs. 1–2.)
Syntax
FTPGetCurDir() --> cDiretorioReturn value
Directory text; source does not detail errors.
Commented example
#Include "Protheus.ch"
User Function Ed403()
Local bAction := {|| FTPGetCurDir()}
// Do not evaluate: caller must prepare session and paths.
Return NilPrepared block; no FTP operation performed. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Validate permissions, return and session ownership. Close the connection opened by this routine on failure paths too. Do not log passwords.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.