Package org.apache.royale.utils
Class FilenameNormalization
java.lang.Object
org.apache.royale.utils.FilenameNormalization
Utility class to normalize filenames. All Files entering the driver
should be run through this class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisNormalized(String path) Determines whether a file path is in normalized form.static FileNormalize aFile.static File[]Normalizes an array of files.static StringNormalize aString.static StringnormalizeFileToPath(File file) Get the normalized file path of a JavaFileobject.
-
Constructor Details
-
FilenameNormalization
public FilenameNormalization()
-
-
Method Details
-
normalize
Normalizes an array of files.- Parameters:
files- Array of files to normalize.- Returns:
- Array of normalized files.
- See Also:
-
normalize
Normalize aFile. This method normalizes the case of the file path characters and then callsFilenameUtils.normalize(String).- Parameters:
f- A file.- Returns:
- The normalized File.
- See Also:
-
FilenameUtils.normalize(String)
-
normalize
Normalize aString. This method normalizes the case of the file path characters and then callsFilenameUtils.normalize(String).- Parameters:
path- The fiel path.- Returns:
- The normalized String. If the given path is already normalized, the original string object will be returned.
- See Also:
-
FilenameUtils.normalize(String)
-
isNormalized
Determines whether a file path is in normalized form.- Parameters:
path- A file path.- Returns:
- true if the path is normalized.
-
normalizeFileToPath
Get the normalized file path of a JavaFileobject.- Parameters:
file- File object.- Returns:
- Normalized file path.
-