You are not logged in.
Pages: 1
Delphi 11.3, mORMot2 GitHub commit 5420 (e4ccc8e)
Function I7zWriter.AddFiles:
/// add (or replace) some files from a folder within the archive
procedure AddFiles(const Dir, Path, Wildcard: TFileName; recurse: boolean);
I can't find a reasonable use for the "Path" and "Wildcard" parameters. If I write the following:
libWriter.AddFiles('c:\mORMot2\src\', 'mormot_2023-05-04', '*', True);
The result is a 7z file without files with a directory structure that looks like this:
mormot_2023-05-04\c_\mORMot2\src\app
mormot_2023-05-04\c_\mORMot2\src\core
...
It would be interesting if "Path" was the starting path in the 7z file. Then you could create something like this, for example:
mormot_2023-04-28\app
mormot_2023-04-28\core
...
mormot_2023-05-04\app
mormot_2023-05-04\core
This would be a very useful functionality.
I can't find a useful use for the "Wildcard" either. Only for "*" I get a result. Which values are intended here? The only solution that works for me is:
libWriter.AddFiles('c:\mORMot2\src\', '', '*', True);
I would have liked it better to use FindFiles from unit mormot.core.search here.
With best regards
Thomas
Offline
Offline
Now these tests have been passed:
libWriter.AddFiles('c:\mORMot2\src\', '', '*', True);
libWriter.AddFiles('c:\mORMot2\src\', 'mORMot_2023-05-05', '*', True);
libWriter.AddFiles('c:\mORMot2\src\', 'mORMot_2023-05-05', '*.pas', True);
libWriter.AddFiles('c:\mORMot2\src\', 'mORMot_2023-05-05', '*.pas;*.inc', True);
With this it works as expected. Thanks for this.
With best regards
Thomas
Offline
Pages: 1