refactor(rest) copyFiles