Class FileUtil
java.lang.Object
com.gamersafer.minecraft.auth.paper.util.FileUtil
A collection of utility methods for accessing and manipulating files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidSaves the resource at the given path to the plugin's data folder.static voidsaveStream(@NonNull InputStream inputStream, @NonNull File output) Saves the contents ofinputStreamtooutput.
-
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 pathplugin- the plugin- Throws:
IllegalArgumentException- if there was no resource with the given path
-
saveStream
Saves the contents ofinputStreamtooutput.- Parameters:
inputStream- the file's input streamoutput- the output file
-