Class RealSystemAccess
- java.lang.Object
-
- org.kie.workbench.common.migration.cli.RealSystemAccess
-
- All Implemented Interfaces:
SystemAccess
@ApplicationScoped public class RealSystemAccess extends Object implements SystemAccess
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.kie.workbench.common.migration.cli.SystemAccess
SystemAccess.Console, SystemAccess.HaltingException
-
-
Constructor Summary
Constructors Constructor Description RealSystemAccess()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SystemAccess.Consoleconsole()voidcopyDirectory(Path source, Path target)PathcreateDirectory(Path dir, FileAttribute<?>... attrs)PathcreateTemporaryDirectory(String prefix, FileAttribute<?>... attrs)PathcurrentWorkingDirectory()PrintStreamerr()<T> Texit(int status)Pathmove(Path source, Path target, CopyOption... options)PrintStreamout()voidrecursiveDelete(Path tmpNiogit)voidsetProperty(String name, String value)
-
-
-
Method Detail
-
exit
public <T> T exit(int status)
- Specified by:
exitin interfaceSystemAccess- Returns:
- This method never returns normally. Either the JVM exits, or an exception is thrown. This return value, is just a convenience.
-
console
public SystemAccess.Console console()
- Specified by:
consolein interfaceSystemAccess
-
currentWorkingDirectory
public Path currentWorkingDirectory()
- Specified by:
currentWorkingDirectoryin interfaceSystemAccess
-
err
public PrintStream err()
- Specified by:
errin interfaceSystemAccess
-
out
public PrintStream out()
- Specified by:
outin interfaceSystemAccess
-
setProperty
public void setProperty(String name, String value)
- Specified by:
setPropertyin interfaceSystemAccess
-
move
public Path move(Path source, Path target, CopyOption... options) throws IOException
- Specified by:
movein interfaceSystemAccess- Throws:
IOException
-
copyDirectory
public void copyDirectory(Path source, Path target) throws IOException
- Specified by:
copyDirectoryin interfaceSystemAccess- Throws:
IOException
-
createDirectory
public Path createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException
- Specified by:
createDirectoryin interfaceSystemAccess- Throws:
IOException
-
createTemporaryDirectory
public Path createTemporaryDirectory(String prefix, FileAttribute<?>... attrs) throws IOException
- Specified by:
createTemporaryDirectoryin interfaceSystemAccess- Throws:
IOException
-
recursiveDelete
public void recursiveDelete(Path tmpNiogit) throws IOException
- Specified by:
recursiveDeletein interfaceSystemAccess- Throws:
IOException
-
-