Locations have an ls
field, so you could type something like
|project://p2-SnakesAndLadders|.ls
to get back all the files and directories at the root level of the project as a list. You can then use functions isFile
and isDirectory
(both of which are in the prelude, so they are available by default) to distinguish between file and directory locations.