On 06/11/2012 05:15 PM, clemper wrote:
> Thanks for your response. I am not sure what SFTP server implementation they (GXS) are using but it definitely seems proprietary.
yes, GS is very very proprietary.
and old.
Used their stuff in 1989 ;-))
> Obviously, "/././POLLABLE" should be an equivalent path to "/POLLABLE"; so they are not really mapping this path to an actual POSIX path on their end. It does seem for now that subclassing sftp is
> the best solution. The problem with this solution in the long run is that I have to create a separate script for each channel with the same contents, which will become somewhat of a maintenance issue.
several solutions to this problem.
often, I use only one outbound and one inbound channel, using composite routes.
that way you only need one channel.
other solution would be to have one script with the actual implementation,
and the other files only import this, so the file is very short, eg:
from filename import GS-sftp
I hope you understand why I feel this is better done by sub-classing the existing sftp-class.
else I will end up with a zillion options in the channel, which will make it hard to understand.
options that are supported by standards should be in parameters, proprietary stuff should be in user scripting.
hope that helps,
henk-jan
ps I made I change for this which is in the bots repository (
http://code.google.com/p/bots/source/browse/)
the sftp class now has a method 'set_cwd' which set the working directory.
sftp class is now more similar to existing ftp-classes.
in your case, you only need to overwrite this method.