Method FTPClient2():curDir() Foundation

Gets or sets the current working directory.

Syntax
:curDir( [<cNewDir>] ) --> cResult
Parameters
<cNewDir>
The relative or fully qualified path of the directory to change to. The parameter is optional. When no path is specified, only the path of the current directory is returned and the current directory is not changed.
Return

The previous current directory path, or an empty string on error.

Description

Gets the current working directory or changes to a different directory on the FTP server.

If changing or setting the directories fails an empty string is returned. Use :getLastError() and :getLastMessage() methods to obtain detailed error information.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.