One last hint then you need to figure the rest out on your own (unles some genius from another country decides to spoon feed you the answer). ...
String waVpath = task.getArea().getVPath().toString(); CSDir dirTemp=(CSDir)client.getFile(new CSVPath(waVpath)); CSSortKey[] sortArray=new CSSortKey[1]; sortArray[0]=new CSSortKey(CSSortKey.NAME, true); CSIterator dirs=dirTemp.getFiles(CSFileKindMask.ALLNONHOLES, sortArray, CSFileKindMask.ALLNONHOLES | CSFileKindMask.DIR, null, 0, -1); while (dirs.hasNext()) { CSFile file2=(CSFile)dirs.next(); String filename=file2.getName(); System.out.println("filename of dir is: "+file2.getName());}