if (root.isDirectory()) {
File[] children = root.listFiles();
if (children != null) {
if (userText != null && userText.length() > 0) {
try {
Path path = Path.parse(userText);
if (path.isRelative()) {
File from;
String suffix;
if (path.getExt() == null) {
from = sourcePath.getPath(root, path.getName());
if (from == null) {
from = sourcePath.getPath(root, path.getDirs());
suffix = path.getSimpleName();
} else {
suffix = "";
}
} else {
from = sourcePath.getPath(root, path.getDirs());
suffix = path.getSimpleName();
}
if (from != null) {
completions = list(root, from, suffix);
}
}