Issue Details (XML | Word | Printable)

Key: NET-157
Type: Wish Wish
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Michael Labicki
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Net

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

Created: 13/Apr/07 12:26 PM   Updated: 18/Feb/08 12:09 AM
Return to search
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0

Time Tracking:
Not Specified

Environment: jdk1.5.0_07 ; Linux

Resolution Date: 18/Feb/08 12:09 AM


 Description  « Hide
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?



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.