MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / IsEmptyDir

Function IsEmptyDir

agent/utils/files/utils.go:322–330  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

320}
321
322func IsEmptyDir(dir string) bool {
323 f, err := os.Open(dir)
324 if err != nil {
325 return false
326 }
327 defer f.Close()
328 _, err = f.Readdirnames(1)
329 return err == io.EOF
330}
331
332func DownloadFileWithProxy(url, dst string) error {
333 resp, cancel, err := req_helper.RequestFile(url, http.MethodGet, constant.TimeOut5m)

Callers

nothing calls this directly

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected