Directory separator and parent directory (General questions)
Hello,
some questions:
* is it certain that a slash / is always being
used as directory separator regardless of host
or client system?
* has the RemotePath never a trailing slash?
* actually a request (probably not possible with
version 2 if I understand other topics correctly):
support for parent directory method. Since FtpDlx
knows the RemotePath and directory separator, it
should also provide a means to go up as other
vendors do - regardless of absolute paths or not.
Saves your customers time and eases conversion.
* FtpDlx offers RemotePath property. But a command
like (in Delphi):
wftp.RawSend ('CWD ..' + CRLF);
does not affect the RemotePath at all.
When is the RemotePath property actually reset/
re-evaluated by FtpDlx?
I'm guessing you'd suggest not to use it at all, right?
Cheers,
Tobias
Re: Directory separator and parent directory
1) Yes, / is always being used as directory separator.
2) You can add for RemotePath /home/something/joe/ or /home/something/joe it it same for wodFtpDLX. WodFtpDLX will accept both values.
3) Sorry, there is no support for parent directory method.
4) I suggest you to use full path for ListDir,GetFile,PutFile... Methods. That will give you exactly what you need.
You can call RemotePath more than ones in your code and it will hold value of last called RemotePath.
I try it with wftp.RawSend ('CWD ..' + CRLF) as you mention and it didn't affect RemotePath.
Re: Directory separator and parent directory
Tobias,
I wanted to mention that there is not term 'current path' in wodFtpDLX, so doing CD .. doesn't have any effect. You *MUST* specify full path in RemotePath property, so there's no point in changing the path manually..
Anyway, wodFtpDLX has same interface for all protocols it supports. SFTP doesn't have CD command, so it doesn't work 'the ftp way'.
Regards,
Kreso
Re: Directory separator and parent directory
Hello Drazen and Kreso,
thanks for the clarifications. Just got it to work by adding
some code to remove the last directory name from the
RemotePath to set it newly.
Thanks a lot,
Tobias