Package me.yleoft.zAPI.managers
Class FileManager
java.lang.Object
me.yleoft.zAPI.managers.FileManager
FileManager class to manage files in the plugin's data folder.
It provides methods to create and manage language files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FileUtilscreateFile(@NotNull String path) Creates a new file in the plugin's data folder.static org.bukkit.configuration.file.YamlConfigurationRetrieves a file by its name.getFiles()static FileUtilsgetFileUtil(@NotNull String path) Retrieves a file utils by its name.
-
Field Details
-
df
-
-
Constructor Details
-
FileManager
public FileManager()
-
-
Method Details
-
getFiles
-
createFile
Creates a new file in the plugin's data folder.- Parameters:
path- The path of the file to create.- Returns:
- The
YamlConfigurationof the created file or an existing file.
-
getFileUtil
Retrieves a file utils by its name.- Parameters:
path- The name of the file to retrieve.- Returns:
- The
YamlConfigurationof the file. - Throws:
IllegalArgumentException- if the file is not found.
-
getFile
public static org.bukkit.configuration.file.YamlConfiguration getFile(@NotNull @NotNull String path) Retrieves a file by its name.- Parameters:
path- The name of the file to retrieve.- Returns:
- The
YamlConfigurationof the file. - Throws:
IllegalArgumentException- if the file is not found.
-