java.lang.Object
com.marginallyclever.donatello.FileHelper
Convenient methods for searching files in a directory and finding the user's donatello/extensions path.
- Since:
- 2022-03-??
- Author:
- Dan Royer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertToFileURL
(String filename) Convert from a filename to a file URL.static void
Attempts to create a directory if it does not exist.static String
Returns the extension path ~/Donatello/extensions/static String
Returns the path ~/Donatello/Donatello.logstatic String
Returns the path ~/Donatello/
-
Constructor Details
-
FileHelper
public FileHelper()
-
-
Method Details
-
createDirectoryIfMissing
Attempts to create a directory if it does not exist.- Parameters:
dir
- the desired path
-
getExtensionPath
Returns the extension path ~/Donatello/extensions/- Returns:
- the extension path ~/Donatello/extensions/
-
getWorkPath
-
getLogFile
Returns the path ~/Donatello/Donatello.log- Returns:
- the path ~/Donatello/Donatello.log
-
convertToFileURL
-