Directory separator and parent directory - WeOnlyDo Discussion board

Directory separator and parent directory (General questions)

by condev1972, Sunday, May 14, 2006, 23:12 (6767 days ago)

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

by wodDrazen, Monday, May 15, 2006, 11:32 (6767 days ago) @ condev1972

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

by wodSupport, Monday, May 15, 2006, 11:36 (6767 days ago) @ wodDrazen

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

by condev1972, Monday, May 15, 2006, 12:13 (6767 days ago) @ wodSupport

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