StringVector getFiles(String rootDirectory, boolean reload)
throws Exception {
String ext = (this.extension == null ? FileSystemPersistence.DEFAULT_FILE_EXTENSION : this.extension);
String dir = getDirectory(rootDirectory);
XFile xf = new XFile(dir);
if (!xf.exists() || !xf.isDirectory()) {
throw new Exception("Directory '" + dir + "' does not exist");
}
if (files == null || reload) {
files = xf.getFiles(false, "*" + ext);
}
return files;
}