Avoid "." and ".." directories in FTP
<p>When I retrieve FTP files using Apache commons API, I am getting "." and ".." directories in all directories including sub-directories.  How can I avoid those two directories? Can anybody suggest me?</p>

<p>my code is: </p>

<pre><code>client.changeWorkingDirectory("/");
String[] names = client.listNames();
for (String name : names) {
System.out.println("File Name = " + name);
}
FTPFile[] ftpFiles = client.listFiles(); // Want to eliminate "." and ".." files 

output: 
File Name = .
File Name = ..
File Name = .ftpquota
File Name = file1
File Name = file2
</code></pre>
