Update Files Delete PIP

by 0xLeon, Dec 4th 2011

Update Files Delete PIP

0xLeon

1.0.1, Dec 4th 2011

Community Framework 1.1.x, 1.0.x

LGPL

238

More about this plug-in

Upgrade your packages by the ability to delete old files, which are no longer necessary. Information: This package doesn't provide any function to end users. It's a development tool only.
Sometimes during development you rename, move or just don't need a file anymore. To keep a system clean you should delete this files, too, if a user updates his old version to a new one. Unfortunately WCF doesn't provide such a function.
Using Updates Files Delete PIP this won't be a problem anymore. You can delete files with an additional xml file and xml tag within the update instructions of your package. The structure of these is very similar to the structure known from WCF.
To include the xml file with the infomation of the files which should be deleted, just add a <filesdelete>filesdelete.xml</filesdelete> tag to your update instructions. You can chose another file name but one should stick to this convention.
The filesdetele.xml file is comperable to e.g. an eventlistener.xml file. However the root element was named <files>. Additionally there isn't an <import> block, a <delete> block is allowed only. The <delete> block may contain any number of empty <file> tags. Every <file> tag must have a name attribute whose value must be set to the relative path to a file which should be deleted. Remember a package can only delete files associated with the package beeing updated. This avoids the system from becoming inconsistent because of a falsly deleted files.
Here you can see an example of a filesdelete.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<files xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com https://raw.github.com/Leon-/com.leon.wcf.package.update.delete.files/master/XSD/filesdelete.xsd">
<delete>
<file name="lib/system/event/listener/IndexPageExampleListener.class.php" />
</delete>
</files>




Versions (1)

Version 1.0.1

Dec 4th 2011, 12.29 kB, 238 Downloads

- [Fix] Added missing language variables.

What has changed?

Here you can read what has changed in the different versions of the software and download an older version if necessary.