Files
VisualSapfor/src/Visual_DVM_2021/Passes/All/TestPass.java

15 lines
675 B
Java
Raw Normal View History

package Visual_DVM_2021.Passes.All;
2023-12-07 00:09:10 +03:00
import Common.Utils.Utils;
import Visual_DVM_2021.Passes.PassException;
import Visual_DVM_2021.Passes.SSH.CurrentConnectionPass;
public class TestPass extends CurrentConnectionPass {
2023-11-08 23:13:16 +03:00
@Override
protected void ServerAction() throws Exception {
String dir = "/home/testuser/jack sparrow/";
String command = "rm -rf " + Utils.DQuotes(dir);
if (!dir.isEmpty() && !dir.equals("/") && !dir.equals("\\") && !dir.equals("*")) {
user.connection.Command(command);
} else throw new PassException("Недопустимый путь для удаления папки " + Utils.DQuotes(dir));
2023-11-08 23:13:16 +03:00
}
2023-09-17 22:13:42 +03:00
}