if (!directory.isDirectory()) {
/*
* FIXME: Check what happends when trying to list dir contents of an
* element. Fix arguments to OwfsException
*/
throw new OwfsException("Error", 1);
}
for (File file : directory.listFiles()) {
contents.add(file.getAbsolutePath().substring(root_length));
}
return contents;