FileSystemView: The methods for changing and getting the current working 
directory have non similar names
---------------------------------------------------------------------------------------------------------

                 Key: FTPSERVER-191
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-191
             Project: FtpServer
          Issue Type: Bug
            Reporter: Andrea Francia


The following snippet shows some methods names of current FileSystemView 
interface:

public interface FileSystemView {

    /**
     * Get user current directory.
     */
    FtpFile getCurrentDirectory() throws FtpException;

    /**
     * Change directory.
     */
    boolean changeDirectory(String dir) throws FtpException;
}


If the methods changeDirectory() and getCurrentDirectory() refers the same 
thing I think they should have similar names. For example:
 * changeFoo()
 * getFoo()

The word 'current' is not useful because in that enviroment is obvious that is 
the current one. 
The rfc959 uses the following terminolog for the relevant commands:
 - CHANGE WORKING DIRECTORY (CWD)
 - PRINT WORKING DIRECTORY (PWD)

So I think the word to use is 'working'.

I think the methods should be renamed in:

 * boolean changeWorkingDirectory(String dir) { ... }
 * FtpFile getWorkingDirectory() { ... }


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to