removeFiles

This commit is contained in:
2022-07-05 00:14:55 +00:00
parent 29a010e110
commit 804bced6da
2 changed files with 8 additions and 0 deletions

View File

@@ -457,6 +457,9 @@ class SpecialForms {
macro null;
};
// TODO these macro forms cause the compiler errors to give line numbers
// pointing back to SpecialForms.hx, which aren't helpful. withMacroPosOf should be used
// to wrap them
macro if ($condition)
$thenExp
else

View File

@@ -105,6 +105,11 @@
file pathInArchive)))
(e.files.push pathWithoutDir))))))
(function removeFiles [:nat.Archive archive :nat.Entry e :Array<String> files]
(withWritableEntry archive e
(doFor file files
(e.files.remove file))))
(function addTags [:nat.Archive archive :nat.Entry e :Array<String> tagsToAdd]
(if (hasComponent e Tags)
(withWritableComponents archive e [tags Tags]