Hello Christian --
On Thu, Mar 31, 2022 at 02:45:34PM +0200, Christian Grün scripsit:
It’s sufficient to supply the directory path as second argument:
db:create('db', '/path')
What I've been trying is
db:create('DB', file:descendants($path)[ends-with(.,$suffix), (), $paramsMap)
and I now realize that I can't do that with the third param.
If you want to filter the input paths before passing them on to db:create, you can supply the paths as both inputs and database paths:
let $files := file:descendants('/path') [file:is-file(.)] [contains(file:read-text(.), 'abalaba')] return db:create('db', $files, $files)
That works!
Thank you!
-- Graydon