support renaming files

This commit is contained in:
Chris Lu
2018-06-06 22:11:01 -07:00
parent b3447f4375
commit 5c25d29272
7 changed files with 169 additions and 70 deletions

View File

@@ -195,7 +195,7 @@ func (fs *FilerServer) PostHandler(w http.ResponseWriter, r *http.Request) {
// curl -X DELETE http://localhost:8888/path/to
func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) {
err := fs.filer.DeleteEntryMetaAndData(filer2.FullPath(r.URL.Path))
err := fs.filer.DeleteEntryMetaAndData(filer2.FullPath(r.URL.Path), true)
if err != nil {
glog.V(4).Infoln("deleting", r.URL.Path, ":", err.Error())
writeJsonError(w, r, http.StatusInternalServerError, err)