The function
set[loc] visibleFiles(loc l)
from from util::FileSystem allows you to get the files from a directory.
However it does not work if the location is an Eclipse project. Suppose we apply
visibleFiles(|project://HelloWorld/|);
then we get the Java exception
java.lang.IllegalArgumentException: Path must include project and resource name: /HelloWorld(internal error) at $shell$(|main://$shell$|)
java.lang.IllegalArgumentException: Path must include project and resource name: /HelloWorld
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2131)
So, how to get the files in an Eclipse project?
For completeness I give the sample project with only one Java file:
public class HelloWorld
{
public static void main(String[] args) {
System.out.println("Hello World!");
}
}