public class CommandUtil extends Object
| Constructor and Description |
|---|
CommandUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
asyncExeLocalCommand(File file,
String command)
异步执行命令
|
static boolean |
checkContainsDel(String script)
判断是否包含删除命令
|
static void |
closeCache()
关闭缓存执行结果
|
static String |
execSystemCommand(String command)
执行命令
|
static String |
execSystemCommand(String command,
File file)
在指定文件夹下执行命令
|
static String |
generateCommand(File file,
String args) |
static String |
generateCommand(String file,
String args) |
static List<String> |
getCommand()
获取执行命令的 前缀
|
static void |
openCache()
开启缓存执行结果
|
static void |
paddingPrefix(List<String> command)
填充执行命令的前缀
|
static boolean |
systemFastDel(File file)
执行系统命令 快速删除.
|
public static final String SUFFIX
public static void paddingPrefix(List<String> command)
command - 命令public static void openCache()
public static void closeCache()
public static String execSystemCommand(String command)
command - 命令public static String execSystemCommand(String command, File file)
command - 命令file - 文件夹public static void asyncExeLocalCommand(File file, String command) throws Exception
file - 文件夹command - 命令IOException - 异常Exceptionpublic static boolean checkContainsDel(String script)
script - 命令行public static boolean systemFastDel(File file)
file - 文件或者文件夹Copyright © 2017–2022. All rights reserved.