How do I interact with the file system in SWI-Prolog?
I want to do something like this. Write some predicates which match files (either names, or open them up and match contents). But then use Prolog to drive this system so I can do queries and make inferences across the whole thing.
I'm assuming I either need to slurp data about the whole file tree in, in advance. Or I can dynamically generate a "crawl" through the file system inside some recursive predicates.
But I can't find any examples or tutorials that do more than just open, close, read and write a single file.