You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Niklas Gustavsson (JIRA)" <ji...@apache.org> on 2008/10/12 21:16:44 UTC

[jira] Commented: (FTPSERVER-191) FileSystemView: The methods for changing and getting the current working directory have non similar names

    [ https://issues.apache.org/jira/browse/FTPSERVER-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638885#action_12638885 ] 

Niklas Gustavsson commented on FTPSERVER-191:
---------------------------------------------

Agreed, I'm about to make some other changes to the file system API and will put this in as well. Thanks!

> 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.