In FTPClient class listFiles() method is not returning list of files
it doesnot give any compiletime error but on execution gives null
pointer exception.
Actually i want to manipulate files based on their size.
piece of code is:
FTPFile files[] = ftc.listFiles();
for(int i=0;i<files.length;i++)
{
FTPFile file = files[i];
System.out.println("File Size:"+file.getSize());
if((name.endsWith("."))||(name.endsWith(".."))){}
else{
if(name.indexOf(".")!=-1)
{
if(name.endsWith(type))
{
if(files[i].getSize()<size)
FileOutputStream fos = new FileOutputStream(new File
("c:\\download\\",name));
ftc.retrieveFile(name,fos);
}
}
}
}