Class TempFileCopier

java.lang.Object
be.dezijwegel.betteryaml.files.TempFileCopier

public class TempFileCopier
extends Object
  • Constructor Summary

    Constructors
    Constructor Description
    TempFileCopier​(@NotNull org.bukkit.plugin.Plugin plugin, String resourcePath, String fileName, String path)
    Copy the specified file to a relative location of the plugins config folder Provide an empty string if you want to copy to /plugins/YOURPLUGIN/fileName fileName will be equal to the one provided in the constructor
  • Method Summary

    Modifier and Type Method Description
    void deleteCopiedFile()
    Delete the copied file

    Methods inherited from class java.lang.Object

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

    • TempFileCopier

      public TempFileCopier​(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, String resourcePath, String fileName, String path) throws IOException
      Copy the specified file to a relative location of the plugins config folder Provide an empty string if you want to copy to /plugins/YOURPLUGIN/fileName fileName will be equal to the one provided in the constructor
      Parameters:
      plugin - the plugin for which we want to copy a file
      resourcePath - the path in the resources folder, must and end with a slash. Eg. somefolder/ OR can be an empty String
      fileName - the name of the file in this folder
      path - the path that specifies the folder to copy to. MUST end with a forward slash, but none in front eg. subfolder/
      Throws:
      IOException
  • Method Details

    • deleteCopiedFile

      public void deleteCopiedFile()
      Delete the copied file