[Q] FTP upload question

Bergel Alexandre bergel at iam.unibe.ch
Thu Feb 7 11:38:25 UTC 2002


Hello,

On Tue, Feb 05, 2002 at 03:23:10PM +0100, Hannes Hirzel wrote:
> Hi 
> 
> how do I save a string on an ftp server as a file?
> 
> - open the connection (giving user name and password)
> 
> - put the string as a file on the server
> 
> - close the connection

You can use ServerDirectory.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
s:=ServerDirectory new.
s type: #ftp.
s server: 'YourServer.com'.
s user: 'username'.
s password: 'yourpass'.
s openFTP.

stream:=s fileNamed: 'yourfile.txt'.
stream nextPutAll: 'yourString'.
stream close.

s quit.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Regards,
Alexandre



More information about the Squeak-dev mailing list