Hi,
As per the previous email I'm going to experimentally rework
SftpSubsystem to use a db backend.
My current approach is to copy SftpSubsystem and abstract out the file
access. The new class is called AbstractSftpSubsystem.
Right now I've created an interface that mimics all the pertinent bits
of java.io.File as used in SftpSubsystem.
The interface currently looks like this:
public static interface SftpFile { // from java.io.File
boolean exists();
boolean createNewFile();
SftpFile getParentFile(); // based on File.getParentFile()
String getPath();
long length();
boolean canRead();
boolean canWrite();
boolean isFile();
boolean isDirectory();
long lastModified();
SftpFile[] listFiles();
String getName();
boolean delete();
boolean mkdir();
boolean renameTo(SftpFile dest);
SftpFile getAbsoluteFile();
}
I believe this is in line with the discussion so far. If there is a
better way let me know. I'll submit patches if you think this approach
is useful.
The good news is that my company is funding the development time. The
above approach is our short term solution to this problem but we're also
interested in a longer term solution. Mention was made of moving this
into apache ftpServer. We intend to help with that too. I've used
ftpServer to implement a backend FTPS solution so I'm a bit familiar
with the system but I'm not familiar with the details of SFTP. I'm
assuming that SFTP code from SftpSubsystem could be ported into Mina
ftpServer structures.
I'll be focused on the short term solution over the next few weeks but
after that I can move onto the longer term solution.
Discussion/guidance in this task will be greatly appreciated.
Chuck Johnstone