MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / Clear

Method Clear

cli/pkg/common/sshremote.go:220–228  ·  view source on GitHub ↗

清空文件夹

(dirPath string)

Source from the content-addressed store, hash-verified

218
219// 清空文件夹
220func (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// 清空文件夹
231func (instance *SSHRemote) Remove(fileOrDirPath string) bool {

Callers 3

CopyDirectoryMethod · 0.95
checkRemoteDirFunction · 0.80
checkRemoteDirFunction · 0.80

Calls 3

ConvertFilePathMethod · 0.95
ExeSSHCommandMethod · 0.95
CheckErrorFunction · 0.85

Tested by

no test coverage detected