Class FilenameUtils
- java.lang.Object
-
- org.ametys.plugins.extraction.utils.FilenameUtils
-
public final class FilenameUtils extends Object
Helper to sanitize file names.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
sanitize(String filename)
Sanitize a file name, i.e.
-
-
-
Method Detail
-
sanitize
public static String sanitize(String filename)
Sanitize a file name, i.e. replace illegal characters with the '_' character.
This does not prevent from creating file names forbidden by the OS such as "con", "com1", "..", "prn", ".", "aux", "nul"...- Parameters:
filename
- The file name to sanitize- Returns:
- The sanitized file name
-
-