CreateFTPDirectory Method
Class: FTP_SERVICE
Creates a directory on the FTP Server.
=
Object.CreateFTPDirectory
Parameter
lcNewDir
New directory
Type Character
Direction Input
Name of the directory to create on the FTP Server.
Return value Boolean
Returns .T. if the function successfully created the directory on the FTP Server. Returns .F. if the function could not create the directory on the server.
Example
LOCAL loFTP,lcPom
#INCLUDE "ftp.h"
SET PROCEDURE TO ftp.prg ADDITIVE 
loFTP=CREATEOBJECT('ftp_service') 

IF loFTP.OpenInternet("ABONNE", "PWD", "10.10.10.10", "21")
   IF !loFTP.CreateFTPDirectory("newfolder")
      ?loFTP.GetExtendedErrorCode(),loFTP.GetExtendedErrorMsg()
   ENDIF
   =loFTP.CloseInternet() 
ENDIF
RELEASE PROCEDURE ftp.prg
See also
Expand/Collapse source code of procedure CreateFTPDirectory Source Code
      LPARAMETERS INP lcNewDir
      LOCAL fResult
      IF This.OpenFTPConnection(This.cStartupFolder)     && Open an FTP Handle                 
         lcNewDir = lcNewDir + cNULL

         =This.BeforeCreateFTPDirectory(@lcNewDir)
         fResult = FtpCreateDirectory(This.nConnect_Handle, @lcNewDir)
         =This.GetExtendedError()
         =This.AfterCreateFTPDirectory(@lcNewDir,fResult)
         =IIF(This.lMultiOperations,.T.,This.CloseFTPConnection())   && Close FTP Handle

         RETURN fResult = 1
      ENDIF
      RETURN .F.