-
- All Implemented Interfaces:
-
eu.jrie.jetbrains.kotlinshell.processes.execution.ExecutionContext,eu.jrie.jetbrains.kotlinshell.processes.execution.ProcessExecutionContext,eu.jrie.jetbrains.kotlinshell.shell.ShellBase
@ExperimentalCoroutinesApi() public interface ShellUtility implements ShellBase
-
-
Method Summary
Modifier and Type Method Description Filecd()Changes directory to user root Filecd(Up up)Changes directory to its parent Filecd(Pre pre)Changes directory to previous Filecd(String path)Changes directory to given path abstract Filecd(File dir)Changes directory to given dir abstract Unitvariable(Pair<String, String> variable)Adds new shell variable abstract Unitvariable(Readonly $self, Pair<String, String> variable)abstract Unitexport(Pair<String, String> env)Adds new environment variable abstract Unitexport(Readonly $self, Pair<String, String> env)abstract Unitunset(String key)Removes shell or environmental variable matching given key Stringenv(String key)Retrieves environment or shell variable matching given key or ""Filefile(String name)Gets file with name relative to current directory. Filefile(String name, String content)Creates new file with given name relative to current directory. Filemkdir(String name)Creates directory with name relative to current directory SuspendFunction1<ExecutionContext, Unit>getEnv()SuspendFunction1<ExecutionContext, Unit>getSet()Map<String, String>getShellEnv()Map<String, String>getSystemEnv()abstract CoroutineScopegetScope()CoroutineScope used by this shell, its members and sub shells abstract Map<String, String>getEnvironment()Environment of this shell. abstract Map<String, String>getVariables()Variables of this shell. abstract FilegetDirectory()Current directory of this shell abstract ProcessCommandergetCommander()abstract ReceiveChannel<ByteReadPacket>getStdin()abstract SendChannel<ByteReadPacket>getStdout()abstract SendChannel<ByteReadPacket>getStderr()-
-
Method Detail
-
file
File file(String name)
Gets file with name relative to current directory. If file don't exist it creates it.
-
file
File file(String name, String content)
Creates new file with given name relative to current directory. If file already existed it overrides it.
-
getEnv
SuspendFunction1<ExecutionContext, Unit> getEnv()
-
getSet
SuspendFunction1<ExecutionContext, Unit> getSet()
-
getShellEnv
Map<String, String> getShellEnv()
-
getSystemEnv
Map<String, String> getSystemEnv()
-
getScope
abstract CoroutineScope getScope()
CoroutineScope used by this shell, its members and sub shells
-
getEnvironment
abstract Map<String, String> getEnvironment()
Environment of this shell. These variables are being inherited to sub shells.
-
getVariables
abstract Map<String, String> getVariables()
Variables of this shell. These variables are not being inherited to sub shells.
-
getDirectory
abstract File getDirectory()
Current directory of this shell
-
getCommander
abstract ProcessCommander getCommander()
-
getStdin
abstract ReceiveChannel<ByteReadPacket> getStdin()
-
getStdout
abstract SendChannel<ByteReadPacket> getStdout()
-
getStderr
abstract SendChannel<ByteReadPacket> getStderr()
-
-
-
-