Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-157

Get "hidden files" over ftp, using commons-vfs

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • None
    • None
    • jdk1.5.0_07 ; Linux

    Description

      I was trying to show "hidden files" by using commons-vfs, but I found no solution to do this by the way.
      So I have patched the FTPClient - Class in commons-net 2.0.
      The Default-Constructor sets the "__listHiddenFiles" property to false. I change the property to true.

      -----------------------------

      "__listHiddenFiles = true;"

      -----------------------------

      The next necessary change I made, was in the "getListArguments" method:

      -----------------------------

      protected String getListArguments(String pathname) {
      if (getListHiddenFiles() && pathname != null)

      { StringBuffer sb = new StringBuffer().append("-a ").append(pathname); pathname = sb.toString(); }

      else if (getListHiddenFiles())

      { pathname = "-a "; }

      return pathname;
      }

      -----------------------------

      Maybe you can integrate this patch in your next apache.commons.net version?

      Attachments

        Activity

          People

            Unassigned Unassigned
            johnny Michael Labicki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: