With regard to writing FTPlets  (subclassed from DefaultFtplet):
 
>From within the body of the FTPlet's  onUploadEnd() method, which has only an 
>FTPSession and FTPRequest as parameters, how does one get the current working 
>directory for this Upload?
 
For example:  a remote user, using an FTP client, uploads a file to our 
organization's  running Apache FTPServer  instance.
In our FTPlet, onUploadEnd is called once the file has been uploaded to our 
end, saved on the server's file system. So from within the method body of  
onUploadEnd(session, request),  we need to find out the ENTIRE filepath where 
that upload was saved on OUR filesystem.
 
Only the name of the file is available from the request object.  I see no other 
methods in request, or in the session object, to obtain the directory which the 
user uploaded the file to.  Of course, the user on the client end could have 
browsed through our directory structure using his FTP client  (i.e. through CWD 
commands)--to select a subdirectory on our filesystem to which to upload their 
file.
 
So, to know where they uploaded it---programmatically--- we need to know the 
present working directory for This session.  It could be a different value for 
every session. 
 
I see no methods in FtpSession or FtpRequest which make that available. Am I 
wrong?
 
_________________________________________________________________
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

Reply via email to