Class FileUtil

java.lang.Object
de.paull.lib.files.FileUtil

public class FileUtil extends Object
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • createFile

      public static boolean createFile(File filename)
      Creates a file or dir, if not already present.
      Parameters:
      filename - the file which will be created
      Returns:
      true, if the creation was succesfull, false if there was an error
    • readFile

      public static String readFile(String filename)
      Reads a file if present. Otherwise, creates the file
      Parameters:
      filename - the file which will be created
      Returns:
      content of the file or empty string when freshly created. Will return null if an error occurs.