清空文件夹
(fileOrDirPath string)
| 229 | |
| 230 | // 清空文件夹 |
| 231 | func (instance *SSHRemote) Remove(fileOrDirPath string) bool { |
| 232 | fileOrDirPath = instance.ConvertFilePath(fileOrDirPath) |
| 233 | |
| 234 | command := fmt.Sprintf(`sudo rm -rf %v`, fileOrDirPath) |
| 235 | _, err := instance.ExeSSHCommand(command) |
| 236 | CheckError(err) |
| 237 | |
| 238 | return true |
| 239 | } |
| 240 | |
| 241 | // 复制本地文件夹中的文件到 远程主机对应的目录下 |
| 242 | func (instance *SSHRemote) CopyDirectory(srcDirPath string, remoteDestDirPath string) error { |
no test coverage detected