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