|
|
@@ -39,9 +39,6 @@ public class FileResourceHandler extends BasicResourceHandler {
|
|
|
|
|
|
@Override
|
|
|
public void delete(ResourceDescriptor descriptor) throws IOException {
|
|
|
- if (descriptor == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
File file = getFile(descriptor.getUriString());
|
|
|
if (file.isDirectory()) {
|
|
|
throw new IOException("资源为文件夹!");
|
|
|
@@ -50,15 +47,11 @@ public class FileResourceHandler extends BasicResourceHandler {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void move(Request request) throws IOException, WSException {
|
|
|
- if (request == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- File file = getFile(request.getResourceDescriptor().getUriString());
|
|
|
+ public void move(ResourceDescriptor descriptor, String destinationURI) throws IOException {
|
|
|
+ File file = getFile(descriptor.getUriString());
|
|
|
if (file.isDirectory()) {
|
|
|
throw new IOException("资源为文件夹!");
|
|
|
}
|
|
|
- String destinationURI = getDestinationURI(request);
|
|
|
FileUtils.move(file, new File(getFile(destinationURI), file.getName()));
|
|
|
}
|
|
|
}
|