File system access in Squeak
Dominic Letz
dominic.letz at berlin.de
Tue Apr 17 17:57:57 UTC 2007
Try using the FTPClient class it is already in the base image. It is very
easy to use. Here a little example uploading a file
uploadFtp
| client |
[StandardFileStream fileNamed: 'myfile.zip' do: [:fileStream |
client := FTPClient openOnHostNamed: 'ftp.mywebsite.com'.
client
loginUser: 'user' password: 'password';
changeDirectoryTo: 'httpdocs/temp';
binary;
putFileStreamContents: fileStream as: 'myfile.zip'
]] on: Error do: [
self inform: 'There was an error.'
]
Am 17.04.2007, 19:20 Uhr, schrieb Navodit Kaushik <navoditk at yahoo.co.in>:
> Hi
> Can anyone suggest a good package for file system access? Someone
> suggested Rio but I am not sure how to install it as it does not show up
> in the Package loader...
> I want to be able to work with the files on a ftp server and am not
> sure what to use for this. If possible an example script to connect to a
> ftp server and work with the files therein would be really helpful.
> Thanks
> Navodit
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
More information about the Squeak-dev
mailing list
|