dir = dir + "/";
}
//String remoteDir = StringUtils.removeStart(dir,path);
//System.out.println(">>> " + dir);
WebdavFile f2 = new WebdavFile(getURL(dir));
String[] tmp = f2.list();
if(tmp == null)
{
return;
}
for(int i = 0; i < tmp.length; i++)
{
WebdavFile f3 = new WebdavFile(getURL(dir + tmp[i]));
if(!f3.getAbsolutePath().equals(f3.getCanonicalPath()))
{
//Log.debug("WARNING: Symlink remove");//Skipping symlink, remove may fail.");
f3.delete();
//Log.debug("This is necessary to prevent possible data loss when removing those symlinks.");
//continue;
}
if(f3.isDirectory())
{
//System.out.println(dir);
cleanLocalDir(dir + tmp[i]);
f3.delete();
}
else
{
//System.out.println(dir+tmp[i]);
f3.delete();
}
}
}
catch(Exception ex)
{