use of org.commonjava.indy.pathmapped.model.PathMappedListResult in project indy by Commonjava.
the class PathMappedController method list.
public PathMappedListResult list(String packageType, String type, String name, String path, boolean recursive, String fileType, int limit) {
PathDB.FileType fType = PathDB.FileType.all;
if (isNotBlank(fileType)) {
fType = PathDB.FileType.valueOf(fileType);
}
String[] list;
StoreKey storeKey = new StoreKey(packageType, StoreType.get(type), name);
if (recursive) {
int lmt = DEFAULT_RECURSIVE_LIST_LIMIT;
if (limit > 0) {
lmt = limit;
}
list = fileManager.list(storeKey.toString(), path, true, lmt, fType);
} else {
list = fileManager.list(storeKey.toString(), path, fType);
}
return new PathMappedListResult(packageType, type, name, path, list);
}
Aggregations