Package liquibase.util
Class FilenameUtil
java.lang.Object
liquibase.util.FilenameUtil
- Direct Known Subclasses:
- FilenameUtils
General filename and filepath manipulation utilities.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringConcatenates a filename to a base path using normal command line style rules.static StringgetDirectory(String filename) If the path is a file, return everything up to the file.static StringNormalizes a path, removing double and single dot path steps as well as standardizing on "/" for a slash.static StringsanitizeFileName(String fileName) Remove problematic characters from filename and replace them with '_'
- 
Constructor Details- 
FilenameUtilpublic FilenameUtil()
 
- 
- 
Method Details- 
normalizeNormalizes a path, removing double and single dot path steps as well as standardizing on "/" for a slash.
- 
concatConcatenates a filename to a base path using normal command line style rules. This method uses the operating system rules to determine the path separator.The returned path will be normalize(String)'ed
- 
getDirectoryIf the path is a file, return everything up to the file. If the path is a directory, return the directory.The returned path will be normalize(String)'ed
- 
sanitizeFileNameRemove problematic characters from filename and replace them with '_'- Parameters:
- fileName- Filename to remove characters from
- Returns:
- String Sanitized file name
- See Also:
- 
- 
     What characters are forbidden in Windows and Linux directory names?
 ' ' '/' ':' '"' '\' '|' '*' '?' '<' '>' 
 
- 
     What characters are forbidden in Windows and Linux directory names?
 
 
 
-