(op request.FileRoleReq)
| 368 | } |
| 369 | |
| 370 | func (f *FileService) BatchChangeModeAndOwner(op request.FileRoleReq) error { |
| 371 | fo := files.NewFileOp() |
| 372 | for _, p := range op.Paths { |
| 373 | if !fo.Stat(p) { |
| 374 | return buserr.New("ErrPathNotFound") |
| 375 | } |
| 376 | } |
| 377 | if err := fo.ChownRPaths(op.Paths, op.User, op.Group, op.Sub); err != nil { |
| 378 | return err |
| 379 | } |
| 380 | if err := fo.ChmodRPaths(op.Paths, op.Mode, op.Sub); err != nil { |
| 381 | return err |
| 382 | } |
| 383 | return nil |
| 384 | } |
| 385 | |
| 386 | func (f *FileService) collectPermanentDeleteTargets(targetPath string, isDir bool) ([]string, error) { |
| 387 | if !isDir { |
nothing calls this directly
no test coverage detected