Document `fileDelete` PIP
authorMatthias Schmidt <gravatronics@live.com>
Tue, 8 Jun 2021 16:07:13 +0000 (18:07 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 8 Jun 2021 16:07:13 +0000 (18:07 +0200)
docs/package/pip.md
docs/package/pip/file-delete.md [new file with mode: 0644]
mkdocs.yml
snippets/package/pip/fileDelete.xml [new file with mode: 0644]

index 93ee7096982003382748bdcd0edc4d3da91460f8..1c9983531a568f5fea481d540978e8c4149479a5 100644 (file)
@@ -21,6 +21,7 @@ Package Installation Plugins (PIPs) are interfaces to deploy and edit content as
 | [database](pip/database.md) | Updates the database layout using [the PHP API](database-php-api.md) |
 | [eventListener](pip/event-listener.md) | Register listeners for the event system |
 | [file](pip/file.md) | Deploy any type of files with the exception of templates |
+| [fileDelete](pip/file-delete.md) | Deletes files installed with [file](pip/file.md) |
 | [language](pip/language.md) | Language items |
 | [mediaProvider](pip/media-provider.md) | Detect and convert links to media providers |
 | [menu](pip/menu.md) | Side-wide and custom per-page menus |
diff --git a/docs/package/pip/file-delete.md b/docs/package/pip/file-delete.md
new file mode 100644 (file)
index 0000000..c0bb88c
--- /dev/null
@@ -0,0 +1,19 @@
+# File Delete Package Installation Plugin
+
+Deletes files installed with the [file](pip/file.md) package installation plugin.
+
+!!! warning "You cannot delete files provided by other packages."
+
+
+## Components
+
+Each item is described as a `<file>` element with an optional `application`, which behaves like it does for [acp templates](acp-template.md#application).
+The file path is relative to the installation of the app to which the file belongs.
+
+## Example
+
+{jinja{ codebox(
+    title="fileDelete.xml",
+    language="xml",
+    filepath="package/pip/fileDelete.xml"
+) }}
index 95f27effefc9a180b197dcbc52876cc57bc38bed..0eba921e69679d75f8c973288efdda1fda3035d3 100644 (file)
@@ -83,6 +83,7 @@ nav:
       - 'database': 'package/pip/database.md'
       - 'eventListener': 'package/pip/event-listener.md'
       - 'file': 'package/pip/file.md'
+      - 'fileDelete': 'package/pip/file-delete.md'
       - 'language': 'package/pip/language.md'
       - 'mediaProvider': 'package/pip/media-provider.md'
       - 'menu': 'package/pip/menu.md'
diff --git a/snippets/package/pip/fileDelete.xml b/snippets/package/pip/fileDelete.xml
new file mode 100644 (file)
index 0000000..7b9b582
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/fileDelete.xsd">
+       <delete>
+               <file>path/file.ext</file>
+               <file application="app">lib/data/foo/Fou.class.php</file>
+       </delete>
+</data>