清空文件夹
(dirPath string)
| 218 | |
| 219 | // 清空文件夹 |
| 220 | func (instance *SSHRemote) Clear(dirPath string) bool { |
| 221 | dirPath = instance.ConvertFilePath(dirPath) |
| 222 | |
| 223 | command := fmt.Sprintf(`cd %v && sudo rm -rf {,.[!.],..?}*`, dirPath) |
| 224 | _, err := instance.ExeSSHCommand(command) |
| 225 | CheckError(err) |
| 226 | |
| 227 | return true |
| 228 | } |
| 229 | |
| 230 | // 清空文件夹 |
| 231 | func (instance *SSHRemote) Remove(fileOrDirPath string) bool { |
no test coverage detected