java.lang.Object
com.gamersafer.minecraft.auth.paper.util.FileUtil

public class FileUtil extends Object
A collection of utility methods for accessing and manipulating files.
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • saveFile

      public static void saveFile(@NonNull String path, @NonNull org.bukkit.plugin.java.JavaPlugin plugin) throws IllegalArgumentException
      Saves the resource at the given path to the plugin's data folder.
      Parameters:
      path - the resource path
      plugin - the plugin
      Throws:
      IllegalArgumentException - if there was no resource with the given path
    • saveStream

      public static void saveStream(@NonNull InputStream inputStream, @NonNull File output)
      Saves the contents of inputStream to output.
      Parameters:
      inputStream - the file's input stream
      output - the output file