Class AssetPathUtil

java.lang.Object
com.hypixel.hytale.builtin.asseteditor.util.AssetPathUtil

public class AssetPathUtil extends Object
  • Field Details

  • Constructor Details

    • AssetPathUtil

      public AssetPathUtil()
  • Method Details

    • isInvalidFileName

      public static boolean isInvalidFileName(@Nonnull Path path)
      Validates that the file name is valid for both windows and linux.

      See: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions

      Parameters:
      path - the path to validate
      Returns:
      true if the file name is invalid
    • removeInvalidFileNameChars

      public static String removeInvalidFileNameChars(String name)
      Removes invalid file name characters from a filename
      Parameters:
      name - The unsanitized
      Returns:
      The sanitized file name