Class FileNamingHelper
java.lang.Object
com.inductiveautomation.ignition.common.util.FileNamingHelper
Strips characters that are invalid (to the filesystem) on common OSes. Specifically - ASCII control characters 0-31,
(including CR and LF) and
"*:/|\<>?
, as well as repeated periods.
Duplicated as a single method in Catapult's FileUtil class-
Method Summary
Modifier and TypeMethodDescriptionstatic String
stripIllegalCharacters
(String badfileName) Proxy for stripIllegalCharacters, with anull
fallbackstatic String
stripIllegalCharacters
(String badFileName, String fallback) Given an input string, returns a string with filesystem invalid characters removed
-
Method Details
-
stripIllegalCharacters
Proxy for stripIllegalCharacters, with anull
fallback -
stripIllegalCharacters
Given an input string, returns a string with filesystem invalid characters removed- Parameters:
badFileName
- cannot be nullfallback
- will be used if stripping illegal characters results in an empty string- Returns:
- a sanitized string suitable for use on the filesystem, or the fallback
-