Changeset 5eda3064


Ignore:
Timestamp:
Dec 12, 2018 1:59:27 PM (18 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
51bf23a
Parents:
2746ed5
Message:

Util: Add another ShellCommand? String[] method
to be used by UrlLauncher?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/ShellCommand.java

    r2746ed5 r5eda3064  
    283283     *                      returns an exit status of 0 (indicating success),
    284284     *                      else <code>false</code>.
    285      */
     285     * @deprecated Use the String[] method
     286     */
     287    @Deprecated
    286288    public boolean executeSilentAndWait(String shellCommand) {
    287289        return execute(shellCommand, CONSUME_OUTPUT, WAIT_FOR_EXIT_STATUS);
     290    }
     291
     292    /**
     293     * Passes a command to the shell for execution. This method blocks until
     294     * all of the command's resulting shell processes have completed. Any output
     295     * produced by the executed command will not be displayed.
     296     *
     297     * @param  commandArray The command for the shell to execute,
     298     *                      as a String[].
     299     *                      See Runtime.exec(String[]) for more info.
     300     * @return              <code>true</code> if the spawned shell process
     301     *                      returns an exit status of 0 (indicating success),
     302     *                      else <code>false</code>.
     303     * @since 0.9.38
     304     */
     305    public boolean executeSilentAndWait(String[] commandArray) {
     306        return execute(commandArray, CONSUME_OUTPUT, WAIT_FOR_EXIT_STATUS);
    288307    }
    289308
Note: See TracChangeset for help on using the changeset viewer.