java.lang.Object
omix.util.io.FilePathAnalyzer
public class FilePathAnalyzer extends Object
This class helps to save file paths relative to the saved file.
- Author:
- Dr. Peter Droste
-
Constructor Summary
Constructors Constructor Description FilePathAnalyzer()
-
Method Summary
Modifier and Type Method Description static File
toAbsolutePath(File file, File directory)
Return an absolute representation of the given file in relation to the given directory.static File
toRelativePath(File file, File directory)
This method returns a relative representation of the absolute path in relation to the directory.
-
Constructor Details
-
FilePathAnalyzer
public FilePathAnalyzer()
-
-
Method Details
-
toRelativePath
This method returns a relative representation of the absolute path in relation to the directory.- Parameters:
file
-url
-- Returns:
-
toAbsolutePath
Return an absolute representation of the given file in relation to the given directory.- Parameters:
file
-directory
-- Returns:
- absolute file
-