Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-191

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0-M1, 1.0.0-M2, 1.0.0-M3
    • 1.0.0-M4
    • Core, Ftplets
    • None

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

      Attachments

        Activity

          People

            niklas Niklas Therning
            andreafrancia Andrea Francia
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: