VirtualFile[] children = directory != null ? directory.getChildren() : null;
if (children == null) return;
for (VirtualFile child : children) {
ErlangFileType childType = ErlangFileType.getFileType(child.getName());
if (child.getName().startsWith(childPrefix) &&
(child.isDirectory() || childType == ErlangFileType.HEADER || childType == ErlangFileType.MODULE)) {
result.add(child);
}
}