public final class PathFinder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SOURCE_FOLDER_SRC_MAIN_JAVA
The Constant SOURCE_FOLDER_SRC_MAIN_JAVA keeps the relative path for the source folder
'src/main/java' in maven projects.
|
static java.lang.String |
SOURCE_FOLDER_SRC_MAIN_RESOURCES
The Constant SOURCE_FOLDER_SRC_MAIN_RESOURCES keeps the relative path for the source folder
'src/main/resources' in maven projects.
|
static java.lang.String |
SOURCE_FOLDER_SRC_MAIN_WEBAPP
The Constant SOURCE_FOLDER_SRC_MAIN_WEBAPP keeps the relative path for the source folder
'src/main/webapp' in maven projects.
|
static java.lang.String |
SOURCE_FOLDER_SRC_TEST_JAVA
The Constant SOURCE_FOLDER_SRC_TEST_JAVA keeps the relative path for the source folder
'src/test/java' in maven projects.
|
static java.lang.String |
SOURCE_FOLDER_SRC_TEST_RESOURCES
The Constant SOURCE_FOLDER_SRC_TEST_RESOURCES keeps the relative path for the source folder
'src/test/resources' in maven projects.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getAbsolutePath(java.io.File file,
boolean removeLastChar)
Gets the absolute path.
|
static java.io.File |
getProjectDirectory()
Gets the project directory.
|
static java.io.File |
getProjectDirectory(java.io.File currentDir)
Gets the project directory.
|
static java.io.File |
getRelativePath(java.io.File parent,
java.lang.String... folders)
Gets the file or directory from the given parent File object and the relative path given over
the list as String objects.
|
static java.io.File |
getRelativePathTo(java.io.File parent,
java.util.List<java.lang.String> folders)
Gets the file or directory from the given parent File object and the relative path given over
the list as String objects.
|
static java.io.File |
getRelativePathTo(java.io.File parent,
java.lang.String separator,
java.lang.String folders,
java.lang.String filename)
Gets the file or directory from the given parent File object and the relative path given over
the list as String objects.
|
static java.io.File |
getSrcMainJavaDir()
Gets the src main java dir.
|
static java.io.File |
getSrcMainJavaDir(java.io.File projectDirectory)
Gets the src main java dir.
|
static java.io.File |
getSrcMainResourcesDir()
Gets the src main resources dir.
|
static java.io.File |
getSrcMainResourcesDir(java.io.File projectDirectory)
Gets the src main resources dir.
|
static java.io.File |
getSrcTestJavaDir()
Gets the src test java dir.
|
static java.io.File |
getSrcTestJavaDir(java.io.File projectDirectory)
Gets the src test java dir.
|
static java.io.File |
getSrcTestResourcesDir()
Gets the src test resources dir.
|
static java.io.File |
getSrcTestResourcesDir(java.io.File projectDirectory)
Gets the src test resources dir.
|
public static final java.lang.String SOURCE_FOLDER_SRC_MAIN_JAVA
public static final java.lang.String SOURCE_FOLDER_SRC_MAIN_RESOURCES
public static final java.lang.String SOURCE_FOLDER_SRC_MAIN_WEBAPP
public static final java.lang.String SOURCE_FOLDER_SRC_TEST_JAVA
public static final java.lang.String SOURCE_FOLDER_SRC_TEST_RESOURCES
public static java.lang.String getAbsolutePath(java.io.File file,
boolean removeLastChar)
file - the fileremoveLastChar - the remove last charpublic static java.io.File getProjectDirectory()
public static java.io.File getProjectDirectory(java.io.File currentDir)
currentDir - the current dirpublic static java.io.File getRelativePath(java.io.File parent,
java.lang.String... folders)
parent - The parent directory.folders - The list with the directories and optional a filename.public static java.io.File getRelativePathTo(java.io.File parent,
java.util.List<java.lang.String> folders)
parent - The parent directory.folders - The list with the directories and optional a filename.public static java.io.File getRelativePathTo(java.io.File parent,
java.lang.String separator,
java.lang.String folders,
java.lang.String filename)
parent - The parent directory.separator - The separator for separate the String folders.folders - The relative path as a String object separated with the defined separator.filename - The filename.public static java.io.File getSrcMainJavaDir()
public static java.io.File getSrcMainJavaDir(java.io.File projectDirectory)
projectDirectory - the project directorypublic static java.io.File getSrcMainResourcesDir()
public static java.io.File getSrcMainResourcesDir(java.io.File projectDirectory)
projectDirectory - the project directorypublic static java.io.File getSrcTestJavaDir()
public static java.io.File getSrcTestJavaDir(java.io.File projectDirectory)
projectDirectory - the project directorypublic static java.io.File getSrcTestResourcesDir()
public static java.io.File getSrcTestResourcesDir(java.io.File projectDirectory)
projectDirectory - the project directory