feat: optimize file operation interface (#2757)

* feat: optimize file operation interface

* chore: fix typo

Co-authored-by: Noah Hsu <i@nn.ci>
This commit is contained in:
foxxorcat
2022-12-20 15:02:40 +08:00
committed by GitHub
parent e2bcca2fbd
commit 62a06fa0f9
13 changed files with 330 additions and 121 deletions

View File

@ -46,8 +46,6 @@ func moveFiles(ctx context.Context, src, dst string, overwrite bool) (status int
if err != nil {
return http.StatusInternalServerError, err
}
fs.ClearCache(srcDir)
fs.ClearCache(dstDir)
// TODO if there are no files copy, should return 204
return http.StatusCreated, nil
}
@ -60,7 +58,6 @@ func copyFiles(ctx context.Context, src, dst string, overwrite bool) (status int
if err != nil {
return http.StatusInternalServerError, err
}
fs.ClearCache(path.Dir(dst))
// TODO if there are no files copy, should return 204
return http.StatusCreated, nil
}