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.IOException
public FileSystemOutputHandler(java.io.File directory, ConsoleOutput console) throws java.io.IOException
java.io.IOException
public static java.io.File getDefaultBaseDirectory() throws java.io.IOException
java.io.IOException
- If it cannot be resolvedpublic java.lang.String getOutputLocation()
getOutputLocation
in interface OutputHandler
public boolean exists(java.lang.String path)
exists
in interface OutputHandler
public void write(java.lang.String path, Template contents) throws java.io.IOException
write
in interface OutputHandler
java.io.IOException
public java.io.File write(java.lang.String path, Writable contents) throws java.io.IOException
java.io.IOException
public java.io.File write(java.lang.String path, Writable contents, boolean append) throws java.io.IOException
java.io.IOException
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable