Class FilenameNormalization

java.lang.Object
org.apache.royale.utils.FilenameNormalization

public class FilenameNormalization extends Object
Utility class to normalize filenames. All Files entering the driver should be run through this class
  • Constructor Details

    • FilenameNormalization

      public FilenameNormalization()
  • Method Details

    • normalize

      public static File[] normalize(File[] files)
      Normalizes an array of files.
      Parameters:
      files - Array of files to normalize.
      Returns:
      Array of normalized files.
      See Also:
    • normalize

      public static File normalize(File f)
      Normalize a File. This method normalizes the case of the file path characters and then calls FilenameUtils.normalize(String).
      Parameters:
      f - A file.
      Returns:
      The normalized File.
      See Also:
      • FilenameUtils.normalize(String)
    • normalize

      public static String normalize(String path)
      Normalize a String. This method normalizes the case of the file path characters and then calls FilenameUtils.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

      public static boolean isNormalized(String path)
      Determines whether a file path is in normalized form.
      Parameters:
      path - A file path.
      Returns:
      true if the path is normalized.
    • normalizeFileToPath

      public static String normalizeFileToPath(File file)
      Get the normalized file path of a Java File object.
      Parameters:
      file - File object.
      Returns:
      Normalized file path.