Dies ist die alte 4D Dokumentations-Website. Die neue und aktualisierte Dokumentation finden Sie unter developer.4d.com

Home

 
4D v19
FTP_Receive

FTP_Receive 


 

FTP_Receive ( ftp_ID ; hostPath ; localPath ; progress ) -> Funktionsergebnis 
Parameter Typ   Beschreibung
ftp_ID  Lange Ganzzahl in Reference to a FTP login
hostPath  Text in Pathname of document to receive
localPath  Text in Pathname to destination of document
in Resulting file pathname (if "" passed)
progress  Ganzzahl in *** Obsolete parameter (ignored) ***
Funktionsergebnis  Ganzzahl in Error Code

The FTP_Receive command receives a file using the File Transfer Protocol from the path referenced by hostPath. FTP_Receive will return an error# -48 if the destination file already exists.

ftp_ID is the long integer reference to the FTP session established with FTP_Login.

hostPath is a text value that specifies the path of the document to be received. If hostPath is not a full path to a document, the command will return an error. As with all paths to Unix documents, the path should be separated by slashes ("/"). For more information, see the section entitled Glossary and Terminology at the beginning of the manual.

localPath is a text value that specifies the path of the destination of the document. If localPath is a null string, the user will be presented with a Standard Save-File Dialog and the resulting file pathname will be returned back into the localPath variable. If localPath contains only a filename, the file will be saved in the same folder as the structure of the database (with 4D single-user) or the 4D Client folder (with 4D Server). As with all paths to local documents, the path should be separated by the delimiter appropriate for the platform where the externals are being used. For more information, see the section entitled Glossary and Terminology at the beginning of the manual.

Compatibility: The progress parameter is obsolete and is ignored if passed.

 vUseMacBin:=-1
 $error:=FTP_MacBinary(vFTP_ID;vUseMacBin)
 If($error=10053)
    MacBinaryIsSupported:=False `Ftp server doesn't support the MacBinary protocol
 Else
    MacBinaryIsSupported:=True
 End if
 
 vLocalFile:=""
 If(MacBinaryIsSupported)
    vUseMacBin:=1
    $error:=FTP_MacBinary(vFTP_ID;vUseMacBin`Try to turn MacBinary on for the download
    $error:=FTP_Receive(vFTP_ID;"CGMiniViewer.hqx";vLocalFile)
    If($error=0) & (vUseMacBin=1)
       vDecodePath:=""
       If(IT_Decode(vLocalFile;vDecodePath;8)=0) `MacBinary decode
          DELETE DOCUMENT(vLocalFile`If successful decode of source, then delete it.
       End if
    End if
 End if



Siehe auch 

FTP_MacBinary
IT_Decode

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: IC File Transfer
Nummer: 88936

 
SEITENINHALT 
 
GESCHICHTE 

Erstellt: 4D Internet Commands 6.5
Geändert: 4D Internet Commands v16 R2

 
ARTIKELVERWENDUNG

4D Internet Commands ( 4D v19)