java.lang.Object
ml.karmaconfigs.api.common.karmafile.karmayaml.FileCopy

public final class FileCopy extends Object
Initialize the file copier
  • Constructor Details

    • FileCopy

      public FileCopy(KarmaSource source, String name)
      Initialize the file copy
      Parameters:
      source - the source containing the file to export
      name - the source file name
    • FileCopy

      public FileCopy(Class<?> main, String name)
      Initialize the file copy
      Parameters:
      main - the main class
      name - the source file name
  • Method Details

    • withDebug

      public FileCopy withDebug(boolean status)
      Set debug status
      Parameters:
      status - the debug status
      Returns:
      this instance
    • copy

      public void copy(File destFile) throws IOException
      Copy the file
      Parameters:
      destFile - the file destination
      Throws:
      IOException - if something goes wrong
    • fix

      public void fix(File destFile)
      Fix the sections for files who have section names same as keys
      Parameters:
      destFile - the file to fix