// Loop through all the returned values
Iterator i = contents.iterator();
while(i.hasNext()){
SftpFile entry = (SftpFile)i.next();
// Ignores anything with a . or .. in it
if(entry.getFilename().endsWith(".")) continue;
//m_output.println("[ryan]entry = "+entry+", entry filename = "+entry.getFilename());
// Get the attributes for this directory item
FileAttributes attrib = entry.getAttributes();
//m_output.println("[ryan]attrib = "+attrib+", attrib string = "+attrib.toString());
// Is it a directory or file? add it to the appropriate array
if(attrib.isDirectory() == true && m_details.getRecurse() == true){
folders.add(directory+entry.getFilename()+"/");
}else{
files.add(directory+entry.getFilename());
}
}
}catch(IOException e){
// There was an exception scanning this directory
// TODO; This could possibly mean that the remote directory doesnt exist