Since you're basically interested in all the content of the repository, querying would not be optimal. That is because queries need to be parsed, optimized, ran against the indexes and then data loaded into memory.
IMO the easiest and most performant way is to use the standard JCR API, starting from the root of the workspace and go through each file/folder (similar to the way you would read a file hierarchy via java.util.File). Ordering is something which you can easily implement using ordered java.util collections.
We already have a utility class, which walks a node hierarchy and prints out results, so you can see pretty much what the code looks like: https://github.com/ModeShape/modeshape/blob/master/modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/JcrTools.java#L527
Thanks for the quick reply, and clear answer, will try that now.