|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.construct.util.DirUtils
public final class DirUtils
Various utility methods for managing and refactoring directories and paths
Nested Class Summary | |
---|---|
static interface |
DirUtils.EntryFilter
Simple API to allow selected unpacking of content from bundles |
Method Summary | |
---|---|
static java.lang.String[] |
calculateRelativePath(java.io.File baseDir,
java.io.File targetDir)
Calculate the relative path (and common directory) to get from a base directory to a target directory |
static PomUtils.Pom |
createModuleTree(java.io.File baseDir,
java.io.File targetDir)
Verify all Maven POMs from the base directory to the target, adding missing POMs as required |
static java.util.List |
expandOSGiClassPath(java.io.File outputDir,
java.util.List path,
java.io.File tempDir)
Expand any bundle entries on the classpath to include embedded jars, etc. |
static PomUtils.Pom |
findPom(java.io.File baseDir,
java.lang.String pomId)
Search the local project tree for a Maven POM with the given id |
static void |
pruneEmptyFolders(java.io.File baseDir)
Recursively delete (prune) all empty directories underneath the base directory |
static java.lang.String |
rebasePaths(java.lang.String path,
java.lang.String baseDir,
char pathSeparator)
Refactor path string, adding base directory to all entries |
static java.io.File |
resolveFile(java.io.File file,
boolean ignoreErrors)
Resolve a file to its unique canonical path - null resolves to the current directory |
static boolean |
unpackBundle(java.io.File bundle,
java.io.File here,
DirUtils.EntryFilter filter)
|
static java.lang.String |
updateLogicalParent(java.io.File pomFile,
java.lang.String parentId)
Set the logical parent for a given POM |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.io.File resolveFile(java.io.File file, boolean ignoreErrors)
file
- file, may be nullignoreErrors
- ignore checked exceptions when true
public static PomUtils.Pom findPom(java.io.File baseDir, java.lang.String pomId)
baseDir
- directory in the project treepomId
- either artifactId or groupId:artifactId
public static PomUtils.Pom createModuleTree(java.io.File baseDir, java.io.File targetDir) throws java.io.IOException
baseDir
- base directorytargetDir
- target directory
java.io.IOException
public static java.lang.String[] calculateRelativePath(java.io.File baseDir, java.io.File targetDir)
baseDir
- base directorytargetDir
- target directory
public static java.lang.String updateLogicalParent(java.io.File pomFile, java.lang.String parentId) throws java.io.IOException
pomFile
- directory or file containing the pom to updateparentId
- either artifactId or groupId:artifactId
java.io.IOException
public static java.lang.String rebasePaths(java.lang.String path, java.lang.String baseDir, char pathSeparator)
path
- path to refactorbaseDir
- base directory to addpathSeparator
- path separator
public static java.util.List expandOSGiClassPath(java.io.File outputDir, java.util.List path, java.io.File tempDir)
outputDir
- current output directorypath
- list of classpath elementstempDir
- temporary directory for unpacking
public static boolean unpackBundle(java.io.File bundle, java.io.File here, DirUtils.EntryFilter filter)
bundle
- jarfilehere
- unpack directoryfilter
- selection filter
public static void pruneEmptyFolders(java.io.File baseDir)
baseDir
- base directory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |