public class PackagesXmlFile extends UpdatableXmlFile
myFile| Constructor and Description |
|---|
PackagesXmlFile(java.nio.file.Path file)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPackage(Package pkg,
java.lang.String dir)
Add a package to packages.xml.
|
protected void |
createEmpty(java.io.Writer out)
Create an empty file.
|
void |
removePackageByDir(java.lang.String dir)
Remove a package from packages.xml.
|
compile, transformupdatepublic PackagesXmlFile(java.nio.file.Path file)
throws PackageException
file - The actual file, for [repo]/.expath-pkg/packages.xml.PackageException - If any error when creating the file (if it does
not exist yet).public void addPackage(Package pkg, java.lang.String dir) throws PackageException
pkg - The package to add.dir - The name of the directory where the package is installed,
right below the repository root.PackageException - In case of any error (mostly related to I/Os).public void removePackageByDir(java.lang.String dir)
throws PackageException
dir - The directory to remove from the packages file.PackageException - In case of any error transforming the packages
file.protected void createEmpty(java.io.Writer out)
throws java.io.IOException
UpdatableFilecreateEmpty in class UpdatableFileout - the writer for the file.java.io.IOException - if an error occurs whilst writing the empty file.Copyright © 2015-2020 EXPath. All Rights Reserved