org.gridkit.lab.util.shell
Interface Prompt

All Known Implementing Classes:
Shell.SimpleShell

public interface Prompt


Method Summary
 Prompt backup(String file)
           
 Prompt backup(String file, boolean remove)
           
 Prompt cd(String path)
           
 Prompt cd(String path, boolean mkdirs)
           
 Prompt env(String var, String value)
           
 Prompt exec(OutputStream stdOut, String... command)
           
 Prompt exec(String... command)
           
 Prompt exec(StringBuilder stdOut, String... command)
           
 Prompt execAt(String path, OutputStream stdOut, String... command)
           
 Prompt execAt(String path, String... command)
           
 Prompt execAt(String path, StringBuilder stdOut, String... command)
           
 Shell.ChildProcess execInteractive(OutputStream stdOut, String... command)
           
 Shell.ChildProcess execInteractive(String... command)
           
 Shell.ChildProcess execInteractive(StringBuilder stdOut, String... command)
           
 Shell.ChildProcess execInteractiveAt(String path, OutputStream stdOut, String... command)
           
 Shell.ChildProcess execInteractiveAt(String path, String... command)
           
 Shell.ChildProcess execInteractiveAt(String path, StringBuilder stdOut, String... command)
           
 boolean exists(String path)
           
 Prompt extract(String file)
           
 List<String> find(String pattern)
           
 List<String> find(String path, String pattern)
           
 List<String> list()
           
 List<String> list(String path)
           
 Prompt mkdirs(String path)
           
 Prompt out(OutputStream stdOut)
           
 Prompt out(StringBuilder stdOut)
           
 String pwd()
           
 Prompt rm(Collection<String> paths)
           
 Prompt rm(Collection<String> paths, boolean rf)
           
 Prompt rm(String path)
           
 Prompt rm(String path, boolean rf)
           
 Prompt waitForMatch(String path, String pattern)
           
 Prompt waitTimeout(long to, TimeUnit tu)
           
 Prompt wget(String url)
           
 Prompt writeTo(String path, byte[] data)
           
 Prompt writeTo(String path, byte[] data, boolean append)
           
 Prompt writeTo(String path, InputStream data)
           
 Prompt writeTo(String path, InputStream data, boolean append)
           
 Prompt writeTo(String path, String text)
           
 Prompt writeTo(String path, String text, boolean append)
           
 

Method Detail

env

Prompt env(String var,
           String value)

out

Prompt out(OutputStream stdOut)

out

Prompt out(StringBuilder stdOut)

cd

Prompt cd(String path)
          throws IOException
Throws:
IOException

cd

Prompt cd(String path,
          boolean mkdirs)
          throws IOException
Throws:
IOException

waitTimeout

Prompt waitTimeout(long to,
                   TimeUnit tu)

pwd

String pwd()

list

List<String> list()
                  throws IOException
Throws:
IOException

list

List<String> list(String path)
                  throws IOException
Throws:
IOException

find

List<String> find(String pattern)
                  throws IOException
Throws:
IOException

find

List<String> find(String path,
                  String pattern)
                  throws IOException
Throws:
IOException

mkdirs

Prompt mkdirs(String path)
              throws IOException
Throws:
IOException

rm

Prompt rm(String path)
          throws IOException
Throws:
IOException

rm

Prompt rm(Collection<String> paths)
          throws IOException
Throws:
IOException

rm

Prompt rm(String path,
          boolean rf)
          throws IOException
Throws:
IOException

rm

Prompt rm(Collection<String> paths,
          boolean rf)
          throws IOException
Throws:
IOException

backup

Prompt backup(String file)
              throws IOException
Throws:
IOException

backup

Prompt backup(String file,
              boolean remove)
              throws IOException
Throws:
IOException

wget

Prompt wget(String url)
            throws IOException
Throws:
IOException

extract

Prompt extract(String file)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               String text)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               byte[] data)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               InputStream data)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               String text,
               boolean append)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               byte[] data,
               boolean append)
               throws IOException
Throws:
IOException

writeTo

Prompt writeTo(String path,
               InputStream data,
               boolean append)
               throws IOException
Throws:
IOException

exists

boolean exists(String path)
               throws IOException
Throws:
IOException

waitForMatch

Prompt waitForMatch(String path,
                    String pattern)
                    throws TimeoutException,
                           IOException
Throws:
TimeoutException
IOException

exec

Prompt exec(String... command)
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException

exec

Prompt exec(OutputStream stdOut,
            String... command)
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException

exec

Prompt exec(StringBuilder stdOut,
            String... command)
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException

execAt

Prompt execAt(String path,
              String... command)
              throws IOException,
                     InterruptedException
Throws:
IOException
InterruptedException

execAt

Prompt execAt(String path,
              OutputStream stdOut,
              String... command)
              throws IOException,
                     InterruptedException
Throws:
IOException
InterruptedException

execAt

Prompt execAt(String path,
              StringBuilder stdOut,
              String... command)
              throws IOException,
                     InterruptedException
Throws:
IOException
InterruptedException

execInteractive

Shell.ChildProcess execInteractive(String... command)
                                   throws IOException,
                                          InterruptedException
Throws:
IOException
InterruptedException

execInteractive

Shell.ChildProcess execInteractive(OutputStream stdOut,
                                   String... command)
                                   throws IOException,
                                          InterruptedException
Throws:
IOException
InterruptedException

execInteractive

Shell.ChildProcess execInteractive(StringBuilder stdOut,
                                   String... command)
                                   throws IOException,
                                          InterruptedException
Throws:
IOException
InterruptedException

execInteractiveAt

Shell.ChildProcess execInteractiveAt(String path,
                                     String... command)
                                     throws IOException,
                                            InterruptedException
Throws:
IOException
InterruptedException

execInteractiveAt

Shell.ChildProcess execInteractiveAt(String path,
                                     StringBuilder stdOut,
                                     String... command)
                                     throws IOException,
                                            InterruptedException
Throws:
IOException
InterruptedException

execInteractiveAt

Shell.ChildProcess execInteractiveAt(String path,
                                     OutputStream stdOut,
                                     String... command)
                                     throws IOException,
                                            InterruptedException
Throws:
IOException
InterruptedException


Copyright © 2017. All Rights Reserved.