STORE Command
Hi,
any way to add multiple binary files at once?
<store path="source/_img/">../source/_img/*.*</store>would be nice.
Regards, Max
This works (as part of .bxs file):
<xquery>file:children("../test/en/source/_img/") ! db:store("test",
"source/_img/" || ., file:read-binary(.))</xquery>2015-10-17 15:54 GMT+02:00 Maximilian Gärber <mgaerber at arcor.de>:
Quoted text · Maximilian Gärber · 9 lines
> Hi, > > any way to add multiple binary files at once? > > <store path="source/_img/">../source/_img/*.*</store> > > would be nice. > > Regards, Max
Hi Maxi,
Quoted text · Maximilian Gärber · 4 lines
> This works (as part of .bxs file): > > <xquery>file:children("../test/en/source/_img/") ! db:store("test", > "source/_img/" || ., file:read-binary(.))</xquery>
Dito. I thought about allowing directories as well, but we currently have no way of excluding files. When ADD is applied on directories, only those files matching the CREATEFILTER option will be added. When STORE is called, we could potentially exclude all files match this filter.
Christian
Quoted text · Maximilian Gärber · 12 lines
> > > 2015-10-17 15:54 GMT+02:00 Maximilian Gärber <mgaerber at arcor.de>: >> Hi, >> >> any way to add multiple binary files at once? >> >> <store path="source/_img/">../source/_img/*.*</store> >> >> would be nice. >> >> Regards, Max
Hi,
with command scripts, using <xquery/> is a viable solution.
For the STORE command, I would find it nice to have a STOREFILTER option
Anyways, "nice to have".
Regards,
Max
2015-10-19 14:00 GMT+02:00 Christian Grün <christian.gruen at gmail.com>:
Quoted text · Christian Grün · 29 lines
> Hi Maxi, > > >> This works (as part of .bxs file): >> >> <xquery>file:children("../test/en/source/_img/") ! db:store("test", >> "source/_img/" || ., file:read-binary(.))</xquery> > > Dito. I thought about allowing directories as well, but we currently > have no way of excluding files. When ADD is applied on directories, > only those files matching the CREATEFILTER option will be added. When > STORE is called, we could potentially exclude all files match this > filter. > > Christian > > >> >> >> 2015-10-17 15:54 GMT+02:00 Maximilian Gärber <mgaerber at arcor.de>: >>> Hi, >>> >>> any way to add multiple binary files at once? >>> >>> <store path="source/_img/">../source/_img/*.*</store> >>> >>> would be nice. >>> >>> Regards, Max
Written for BaseX 8.3. BaseX may have changed since: please check the current documentation.