Class Files

java.lang.Object
org.spongepowered.asm.util.Files

public final class Files extends Object
Utility class for file operations
  • Method Details

    • toFile

      public static File toFile(URL url) throws URISyntaxException
      Convert a URL to a file but handle a corner case with UNC paths which do not parse correctly.
      Parameters:
      url - URL to convert
      Returns:
      File
      Throws:
      URISyntaxException - if the URL cannot be converted to a URI
    • toFile

      public static File toFile(URI uri)
      Convert a URI to a file but handle a corner case with UNC paths which do not parse correctly.
      Parameters:
      uri - URI to convert
      Returns:
      File