You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
3.4 KiB
97 lines
3.4 KiB
15 years ago
|
//Auto-generated by kalyptus. DO NOT EDIT.
|
||
11 years ago
|
package org.trinitydesktop.koala;
|
||
15 years ago
|
|
||
11 years ago
|
import org.trinitydesktop.qt.Qt;
|
||
|
import org.trinitydesktop.qt.QtSupport;
|
||
15 years ago
|
import java.util.ArrayList;
|
||
|
|
||
|
/**
|
||
|
|
||
|
\namespace KShell
|
||
|
Provides some basic POSIX shell and bash functionality.
|
||
|
@short \namespace KShell Provides some basic POSIX shell and bash functionality.
|
||
|
@see KStringHandler
|
||
|
|
||
|
*/
|
||
|
public class KShell {
|
||
11 years ago
|
/**
|
||
15 years ago
|
Flags for splitArgs().
|
||
|
@short Flags for splitArgs().
|
||
|
*/
|
||
|
public static final int NoOptions = 0;
|
||
|
public static final int TildeExpand = 1;
|
||
|
public static final int AbortOnMeta = 2;
|
||
|
|
||
11 years ago
|
/**
|
||
15 years ago
|
Status codes from splitArgs()
|
||
|
@short Status codes from splitArgs()
|
||
|
*/
|
||
|
public static final int NoError = 0;
|
||
|
public static final int BadQuoting = 1;
|
||
|
public static final int FoundMeta = 2;
|
||
|
|
||
11 years ago
|
/**
|
||
15 years ago
|
Splits <code>cmd</code> according to POSIX shell word splitting and quoting rules.
|
||
|
Can optionally perform tilde expansion and/or abort if it finds shell
|
||
|
meta characters it cannot process.
|
||
|
@param cmd the command to split
|
||
|
@param flags operation flags, see Options
|
||
|
@param err if not NULL, a status code will be stored at the pointer
|
||
|
target, see Errors
|
||
|
@return a list of unquoted words or an empty list if an error occurred
|
||
11 years ago
|
|
||
15 years ago
|
@short Splits <code>cmd</code> according to POSIX shell word splitting and quoting rules.
|
||
|
*/
|
||
|
public static native ArrayList splitArgs(String cmd, int flags, int[] err);
|
||
|
public static native ArrayList splitArgs(String cmd, int flags);
|
||
|
public static native ArrayList splitArgs(String cmd);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Quotes and joins <code>args</code> together according to POSIX shell rules.
|
||
|
@param args a list of strings to quote and join
|
||
|
@return a command suitable for shell execution
|
||
11 years ago
|
|
||
15 years ago
|
@short Quotes and joins <code>args</code> together according to POSIX shell rules.
|
||
|
*/
|
||
|
public static native String joinArgs(String[] args);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Same as above, but $'' is used instead of '' for the quoting.
|
||
|
The output is suitable for splitArgs(), bash, zsh and possibly
|
||
|
other bourne-compatible shells, but not for plain sh. The advantage
|
||
|
is, that control characters (ASCII less than 32) are escaped into
|
||
|
human-readable strings.
|
||
|
@param args a list of strings to quote and join
|
||
|
@return a command suitable for shell execution
|
||
11 years ago
|
|
||
15 years ago
|
@short Same as above, but $'' is used instead of '' for the quoting.
|
||
|
*/
|
||
|
public static native String joinArgsDQ(String[] args);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Quotes and joins <code>argv</code> together according to POSIX shell rules.
|
||
|
@param argv an array of c strings to quote and join.
|
||
|
The strings are expected to be in local-8-bit encoding.
|
||
|
@return a command suitable for shell execution
|
||
11 years ago
|
|
||
15 years ago
|
@short Quotes and joins <code>argv</code> together according to POSIX shell rules.
|
||
|
*/
|
||
13 years ago
|
// TQString joinArgs(const char** arg1,int arg2); >>>> NOT CONVERTED
|
||
|
// TQString joinArgs(const char** arg1); >>>> NOT CONVERTED
|
||
11 years ago
|
/**
|
||
15 years ago
|
Performs tilde expansion on <code>path.</code> Interprets "~/path" and
|
||
|
"~user/path".
|
||
|
@param path the path to tilde-expand
|
||
|
@return the expanded path
|
||
11 years ago
|
|
||
15 years ago
|
@short Performs tilde expansion on <code>path.</code>
|
||
|
*/
|
||
|
public static native String tildeExpand(String path);
|
||
11 years ago
|
/**
|
||
15 years ago
|
Obtain a <code>user</code>'s home directory.
|
||
|
@param user The name of the user whose home dir should be obtained.
|
||
|
An empty string denotes the current user.
|
||
|
@return The user's home directory.
|
||
11 years ago
|
|
||
15 years ago
|
@short Obtain a <code>user</code>'s home directory.
|
||
|
*/
|
||
|
public static native String homeDir(String user);
|
||
|
}
|