reading and writing files on remote ServerDirectory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

reading and writing files on remote ServerDirectory

Navodit Kaushik
Hi
 
I have set up a webserver on a machine using Komanche with the following code:
 
| ma |
ma := ModuleAssembly core.
ma serverRoot: FileDirectory default fullName.
ma documentRoot: FileDirectory default fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
 
So now if I goto the link: http://xxx.xxx.xxx.xxx:8080 from another machine (xxx.xxx.xxx.xxx is the IP address of the server machine ) I can see the files inside the default directory on the server machine. 
 
Now suppose there is a directory called 'test' on this server and I want to create/read/write files in this directory. How should I go about this?
 
I tried the following but this does not work !
 
serverD := ServerDirectory new.
serverD server:'xxx.xxx.xxx.xxx:8080'.
serverD getFileList
 
I think the error is in my connecting to the server directory. Is this because I created a FileDirectory and not a ServerDirectory while setting up the webserver in the code above? Also I am not sure how to connect to the server directory. Can someone point me to any examples of how to do this or point out the error? Thanks
 
 
 
 


Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: reading and writing files on remote ServerDirectory

Navodit Kaushik
Navodit Kaushik <[hidden email]> wrote:
Hi
 
I have set up a webserver on a machine using Komanche with the following code:
 
| ma |
ma := ModuleAssembly core.
ma serverRoot: FileDirectory default fullName.
ma documentRoot: FileDirectory default fullName.
ma directoryIndex: 'index.html index.htm'.
ma serveFiles.
(HttpService startOn: 8080 named: 'httpd') plug: ma rootModule
 
So now if I goto the link: http://xxx.xxx.xxx.xxx:8080 from another machine (xxx.xxx.xxx.xxx is the IP address of the server machine ) I can see the files inside the default directory on the server machine. 
 
Now suppose there is a directory called 'test' on this server and I want to create/read/write files in this directory. How should I go about this?
 
I tried the following but this does not work !
 
serverD := ServerDirectory new.
serverD server:'xxx.xxx.xxx.xxx:8080'.
serverD getFileList
 
I think the error is in my connecting to the server directory. Is this because I created a FileDirectory and not a ServerDirectory while setting up the webserver in the code above? Also I am not sure how to connect to the server directory. Can someone point me to any examples of how to do this or point out the error? Thanks
 
 
 
 

Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users._______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Help still needed... Any feedback would be highly appreciated. Thanks.
 
Navodit


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners