public final class PathFinder extends Object
| Modifier and Type | Field and Description |
|---|---|
static 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 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 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 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 String |
getAbsolutePath(File file,
boolean removeLastChar)
Gets the absolute path.
|
static File |
getProjectDirectory()
Gets the project directory.
|
static File |
getProjectDirectory(File currentDir)
Gets the project directory.
|
static File |
getRelativePath(File parent,
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 File |
getRelativePathTo(File parent,
List<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 File |
getRelativePathTo(File parent,
String separator,
String folders,
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 File |
getSrcMainJavaDir()
Gets the src main java dir.
|
static File |
getSrcMainJavaDir(File projectDirectory)
Gets the src main java dir.
|
static File |
getSrcMainResourcesDir()
Gets the src main resources dir.
|
static File |
getSrcMainResourcesDir(File projectDirectory)
Gets the src main resources dir.
|
static File |
getSrcTestJavaDir()
Gets the src test java dir.
|
static File |
getSrcTestJavaDir(File projectDirectory)
Gets the src test java dir.
|
static File |
getSrcTestResourcesDir()
Gets the src test resources dir.
|
static File |
getSrcTestResourcesDir(File projectDirectory)
Gets the src test resources dir.
|
public static final String SOURCE_FOLDER_SRC_MAIN_RESOURCES
public static final String SOURCE_FOLDER_SRC_MAIN_JAVA
public static final String SOURCE_FOLDER_SRC_TEST_RESOURCES
public static final String SOURCE_FOLDER_SRC_TEST_JAVA
public static String getAbsolutePath(File file, boolean removeLastChar)
file - the fileremoveLastChar - the remove last charpublic static File getProjectDirectory()
public static File getProjectDirectory(File currentDir)
currentDir - the current dirpublic static File getRelativePath(File parent, String... folders)
parent - The parent directory.folders - The list with the directories and optional a filename.public static File getRelativePathTo(File parent, List<String> folders)
parent - The parent directory.folders - The list with the directories and optional a filename.public static File getRelativePathTo(File parent, String separator, String folders, 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 File getSrcMainJavaDir()
public static File getSrcMainJavaDir(File projectDirectory)
projectDirectory - the project directorypublic static File getSrcMainResourcesDir()
public static File getSrcMainResourcesDir(File projectDirectory)
projectDirectory - the project directorypublic static File getSrcTestJavaDir()
public static File getSrcTestJavaDir(File projectDirectory)
projectDirectory - the project directorypublic static File getSrcTestResourcesDir()
Copyright © 2007–2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.