Class FileManager

java.lang.Object
me.yleoft.zAPI.managers.FileManager

public abstract class FileManager extends Object
FileManager class to manage files in the plugin's data folder. It provides methods to create and manage language files.
  • Field Details

    • df

      public static File df
  • Constructor Details

    • FileManager

      public FileManager()
  • Method Details

    • getFiles

      public static List<FileUtils> getFiles()
    • createFile

      public static FileUtils createFile(@NotNull @NotNull String path)
      Creates a new file in the plugin's data folder.
      Parameters:
      path - The path of the file to create.
      Returns:
      The YamlConfiguration of the created file or an existing file.
    • getFileUtil

      public static FileUtils getFileUtil(@NotNull @NotNull String path)
      Retrieves a file utils by its name.
      Parameters:
      path - The name of the file to retrieve.
      Returns:
      The YamlConfiguration of 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 YamlConfiguration of the file.
      Throws:
      IllegalArgumentException - if the file is not found.