Class FileWriter
java.lang.Object
io.github.chrimle.classforge.utils.FileWriter
Writes content to files - creating directories and files if needed.
- Since:
- 0.1.0
- Author:
- Chrimle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
writeToFile
(String directory, String fullyQualifiedClassName, String content) Writes thecontent
to a file atdirectory
and thepackage
-name from thefullyQualifiedClassName
.static void
writeToFile
(Path filePath, String content) Writes thecontent
to a file atfilePath
.
-
Constructor Details
-
FileWriter
public FileWriter()
-
-
Method Details
-
writeToFile
Writes thecontent
to a file atdirectory
and thepackage
-name from thefullyQualifiedClassName
.- Parameters:
directory
- of the file.fullyQualifiedClassName
- of the class.content
- of the file.- Since:
- 0.1.0
-
writeToFile
Writes thecontent
to a file atfilePath
. Creates the directory and file if needed.- Parameters:
filePath
- of the file.content
- of the file.- Since:
- 0.1.0
-