Package de.paull.lib.files
Class FileUtil
java.lang.Object
de.paull.lib.files.FileUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancreateFile(File filename) Creates a file or dir, if not already present.static StringReads a file if present.
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
createFile
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
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.
-