Class FileUtils

java.lang.Object
com.marcusslover.plus.lib.file.FileUtils

public class FileUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.configuration.file.FileConfiguration
    getConfig(String path, String ext)
    Returns the Config located at the "path" with extension "ext"

    Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
    static org.bukkit.configuration.file.FileConfiguration
    getConfig(String path, String ext, @NotNull org.bukkit.plugin.java.JavaPlugin instance)
    Returns the Config located at the "path" with extension "ext"

    Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
    static File
    getFile(String path, String ext)
    Returns the File located at the "path" with extension "ext".
    static File
    getFile(String path, String ext, @NotNull org.bukkit.plugin.java.JavaPlugin instance)
    Returns the File located at the "path" with extension "ext".
    static File
    getFolder(@NotNull String path)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • getConfig

      public static org.bukkit.configuration.file.FileConfiguration getConfig(String path, String ext, @NotNull @NotNull org.bukkit.plugin.java.JavaPlugin instance)
      Returns the Config located at the "path" with extension "ext"

      Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
      Parameters:
      path - Path to file, using "." as a separator for folders (ex: "data.players")
      ext - File extension (ex: "yml")
      Returns:
      org.bukkit.configuration.file.FileConfiguration
    • getConfig

      public static org.bukkit.configuration.file.FileConfiguration getConfig(String path, String ext)
      Returns the Config located at the "path" with extension "ext"

      Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
      Parameters:
      path - Path to file, using "." as a separator for folders (ex: "data.players")
      ext - File extension (ex: "yml")
      Returns:
      org.bukkit.configuration.file.FileConfiguration
    • getFile

      public static File getFile(String path, String ext)
      Returns the File located at the "path" with extension "ext".

      Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
      Parameters:
      path - Path to file, using "." as a separator for folders (ex: "data.players")
      ext - File extension (ex: "yml")
      Returns:
      java.io.File
    • getFile

      public static File getFile(String path, String ext, @NotNull @NotNull org.bukkit.plugin.java.JavaPlugin instance)
      Returns the File located at the "path" with extension "ext".

      Note: If the file does not exist it will try to be saved from the corresponding location in the plugins resources
      Parameters:
      path - Path to file, using "." as a separator for folders (ex: "data.players")
      ext - File extension (ex: "yml")
      Returns:
      java.io.File
    • getFolder

      public static File getFolder(@NotNull @NotNull String path)