CreateFTPDirectory Method
Class: FTP_SERVICE
Description:Creates a directory on the FTP Server
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.cCurrentDir)     && Open an FTP Handle                 
         lcNewDir = m.lcNewDir + cNULL
                                                    
         =This.BeforeCreateFTPDirectory(@m.lcNewDir)
         fResult = FtpCreateDirectory(This.nConnect_Handle, @m.lcNewDir)
         =This.GetExtendedError()
         =This.AfterCreateFTPDirectory(@m.lcNewDir,m.fResult)
         =IIF(This.lMultiOperations,.T.,This.CloseFTPConnection())   && Close FTP Handle
                   
         RETURN m.fResult = 1
      ENDIF
      RETURN .F.