Mark Proctor wrote:
The more I think about this now the more I think that FtpServer should
encapsulate this functionality, it's just one less thing for the user to
figure out and get wrong.
String getFileName() - returns just the file name, not the path
String getPath() - returns the path from the users home directory
String getAbsolulteFilePath() - returns the complete absolute file path
and name
File getFile() - returns a File object
I would have to say that I object to these. The reasons below:
String getFileName() - this would be the same value as
FtpRequest.getArgument(), right?
String getPath() - this should, and already is, part of the file system
interfaces, FileSystemView.getCurrentDirectory(). Wouldn't that be
sufficient?
String getAbsolulteFilePath() and File getFile() - this would make the
assumption that you really got a traditional file system backing the
FileSystemView. This is the case with NativeFileSystemView in which case
we provide this method, getPhysicalFile(). It's not the case when you,
for example, got a database backing a file system.
I did send an earlier reply to your questions but it seems to got stuck
somewhere, I'll resend it.
/niklas