public class FileSystemOutputHandler extends java.lang.Object implements OutputHandler
| Constructor and Description |
|---|
FileSystemOutputHandler(java.io.File directory,
ConsoleOutput console) |
FileSystemOutputHandler(Project project,
boolean inplace,
ConsoleOutput console) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
exists(java.lang.String path) |
static java.io.File |
getDefaultBaseDirectory()
Resolve the default base directory.
|
java.lang.String |
getOutputLocation() |
void |
write(java.lang.String path,
Template contents) |
java.io.File |
write(java.lang.String path,
Writable contents) |
java.io.File |
write(java.lang.String path,
Writable contents,
boolean append) |
public FileSystemOutputHandler(Project project, boolean inplace, ConsoleOutput console) throws java.io.IOException
java.io.IOExceptionpublic FileSystemOutputHandler(java.io.File directory,
ConsoleOutput console)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.File getDefaultBaseDirectory()
throws java.io.IOException
java.io.IOException - If it cannot be resolvedpublic java.lang.String getOutputLocation()
getOutputLocation in interface OutputHandlerpublic boolean exists(java.lang.String path)
exists in interface OutputHandlerpublic void write(java.lang.String path,
Template contents)
throws java.io.IOException
write in interface OutputHandlerjava.io.IOExceptionpublic java.io.File write(java.lang.String path,
Writable contents)
throws java.io.IOException
java.io.IOExceptionpublic java.io.File write(java.lang.String path,
Writable contents,
boolean append)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable