Witam, mam problem z dość prostym problemem. Próbuje wylistować zwartość folderu w którym to zanjdują się foldery o nazwach numerycznych. Chcę utworzyć listę tych folderów, lokalizacji sieciowej:
public void processImportContents() {
String action = "importCovers";
String importName = "ProcessImportContents";
try {
logger.report(getClass(), importName, action);
String supplierIdFolders = ("file://" + cfg.getString(CommonCfgBean.CONTENTS_HOST) + "/");
List <String> SupplierIdList = Lists.newArrayList();
File folder = new File (supplierIdFolders);
for (String supplierId : folder.list()){
SupplierIdList.add(supplierId);
}
}catch (Exception e){
logger.error(getClass(), "ProcessImportContents" ,"" ,e);
}
}
Na razie wygląda to tak: supplierIdFolder to inaczej file://adres_ip(//172.20.9.135/contents)+"/")
Zależy mi na tym żeby w SupplierIdList znajdowała się lista nazwa folderów ( w postaci Integer)