public class PackagesTxtFile extends UpdatableFile
myFile| Constructor and Description |
|---|
PackagesTxtFile(java.nio.file.Path file) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPackage(Package pkg,
java.lang.String pkg_dir) |
protected void |
createEmpty(java.io.Writer out)
Create an empty file.
|
java.util.Set<java.lang.String> |
parseDirectories()
Return the names of all the package directories, as a set.
|
static java.util.Set<java.lang.String> |
parseDirectories(java.io.InputStream stream)
Return the names of all the package directories, as a set.
|
void |
removePackageByDir(java.lang.String dir) |
updatepublic PackagesTxtFile(java.nio.file.Path file)
throws PackageException
PackageExceptionpublic void addPackage(Package pkg, java.lang.String pkg_dir) throws PackageException
PackageExceptionpublic void removePackageByDir(java.lang.String dir)
throws PackageException
PackageExceptionpublic java.util.Set<java.lang.String> parseDirectories()
throws PackageException
PackageException - if an error occurspublic static java.util.Set<java.lang.String> parseDirectories(java.io.InputStream stream)
throws PackageException
stream - the input streamPackageException - if an error occursprotected 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