java.lang.Object
com.marginallyclever.convenience.helpers.PathHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddExtensionIfNeeded(String filename, String[] extensions) Check filename for a valid extension.static voidstatic voiddeleteDirectory(File directory) Dangerous - recursively deletes directory and all contents!static StringextractFileName(String path) static Stringstatic StringgetExtension(String path) Get the file extension from a path.static voidstatic voidstatic voidstart()
-
Field Details
-
APP_BASE
-
APP_CACHE
-
APP_PLUGINS
-
SCENE_PATH
-
-
Constructor Details
-
PathHelper
public PathHelper()
-
-
Method Details
-
getExtension
-
addExtensionIfNeeded
Check filename for a valid extension. If it doesn't have one, add the first extension in the list.- Parameters:
filename- The filename to check.extensions- A list of valid extensions.- Returns:
- The filename with a valid extension.
-
getCurrentWorkingDirectory
-
setCurrentWorkingDirectory
-
start
public static void start() -
goToAppWorkingDirectory
public static void goToAppWorkingDirectory() -
createDirectoryIfNotExists
-
deleteDirectory
Dangerous - recursively deletes directory and all contents!- Parameters:
directory- The directory to delete.
-
extractFileName
-