Closes a file handle previously opened with WebFtpOpenFile.
WebAPI.bdh
WebFtpCloseFile(in hFtp: number): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hFtp |
Valid handle to an FTP session. This handle must have been returned from a previous call to WebFtpConnect. Beside that, the file must have been opened using WebFtpOpenFile. |
dcltrans transaction TWriteFile var hFtp : number; sData : string(50); nData : number; // number of bytes written begin sData := "Hello world!"; WebFtpConnect(hFtp, "localhost", WEB_PORT_FTP, "user", "pass"); WebFtpOpenFile(hFtp, "testfile.txt", false, true); WebFtpWriteFile(hFtp, sData, Strlen(sData), nData); write(nData); writeln(" bytes written"); WebFtpCloseFile(hFtp); WebFtpShutdown(hFtp); end TWriteFile;