Class IOHandlerImpl
- java.lang.Object
-
- science.aist.gtf.template.impl.handler.IOHandlerImpl
-
- All Implemented Interfaces:
IOHandler<GeneratorTemplate>
public class IOHandlerImpl extends Object implements IOHandler<GeneratorTemplate>
Implementation of
IOHandler
- Since:
- 1.0
- Author:
- Andreas Schuler
-
-
Constructor Summary
Constructors Constructor Description IOHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleDirectoryCopy(GeneratorTemplate context, String src, String target, boolean overwrite, String... exclude)
Copies the full directly treevoid
handleDirectoryCreate(GeneratorTemplate context, String directoryPath)
Creates a directoryvoid
handleFileCopy(GeneratorTemplate context, String sourceFile, String targetFile)
Copies a file from source to targetvoid
unzipFile(GeneratorTemplate context, String sourceFile, String targetDirectory)
Unzips a file
-
-
-
Method Detail
-
handleDirectoryCopy
public void handleDirectoryCopy(GeneratorTemplate context, String src, String target, boolean overwrite, String... exclude)
Description copied from interface:IOHandler
Copies the full directly tree- Specified by:
handleDirectoryCopy
in interfaceIOHandler<GeneratorTemplate>
- Parameters:
context
- the context in which this happenssrc
- the source directorytarget
- the target directoryoverwrite
- flag whether there target directory should be overwritten if it already existsexclude
- the files to exclude
-
handleFileCopy
public void handleFileCopy(GeneratorTemplate context, String sourceFile, String targetFile)
Description copied from interface:IOHandler
Copies a file from source to target- Specified by:
handleFileCopy
in interfaceIOHandler<GeneratorTemplate>
- Parameters:
context
- the context in which this happenssourceFile
- the source file pathtargetFile
- the target file path
-
handleDirectoryCreate
public void handleDirectoryCreate(GeneratorTemplate context, String directoryPath)
Description copied from interface:IOHandler
Creates a directory- Specified by:
handleDirectoryCreate
in interfaceIOHandler<GeneratorTemplate>
- Parameters:
context
- the context in which this should happendirectoryPath
- the directory that should be created
-
unzipFile
public void unzipFile(GeneratorTemplate context, String sourceFile, String targetDirectory)
Description copied from interface:IOHandler
Unzips a file- Specified by:
unzipFile
in interfaceIOHandler<GeneratorTemplate>
- Parameters:
context
- the context in which this should happensourceFile
- the source file that should be unzippedtargetDirectory
- the target directory where to unzip the file to
-
-