use of com.questdb.std.str.NativeLPSZ in project questdb by bluestreak01.
the class $TabsRecordSource method countDirs.
private static int countDirs(LPSZ path) {
int count = 0;
long find = Files.findFirst(path);
if (find == 0) {
return 0;
}
NativeLPSZ file = tlNativeLpsz.get();
try {
do {
file.of(Files.findName(find));
if (Files.isDots(file)) {
continue;
}
if (Files.findType(find) == Files.DT_DIR) {
count++;
}
} while (Files.findNext(find) > 0);
} finally {
Files.findClose(find);
}
return count;
}
Aggregations