Details
Description
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() { ... }