fixed webdav copy/move [ci skip]

This commit is contained in:
Sebastian Stenzel
2016-02-14 00:26:47 +01:00
parent f0cb91b22f
commit cf64a6c425
14 changed files with 97 additions and 64 deletions
@@ -7,7 +7,6 @@ package org.cryptomator.filesystem;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.time.Instant;
import java.util.stream.Stream;
/**
@@ -151,17 +150,4 @@ public interface Folder extends Node {
}
}
/**
* <p>
* Sets the creation time of the folder.
* <p>
* Setting the creation time may not be supported by all {@link FileSystem FileSystems}. If the {@code FileSystem} this {@code Folder} belongs to does not support the
* setting the creation time the behavior of this method is unspecified.
*
* @param instant the time to set as creation time
*/
default void setCreationTime(Instant instant) throws UncheckedIOException {
throw new UncheckedIOException(new IOException("CreationTime not supported"));
}
}
@@ -5,6 +5,7 @@
******************************************************************************/
package org.cryptomator.filesystem;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.time.Instant;
import java.util.Optional;
@@ -45,6 +46,19 @@ public interface Node {
return Optional.empty();
}
/**
* <p>
* Sets the creation time of this node.
* <p>
* Setting the creation time may not be supported by all {@link FileSystem FileSystems}. If the {@code FileSystem} this {@code Node} belongs to does not support the
* setting the creation time the behavior of this method is unspecified.
*
* @param instant the time to set as creation time
*/
default void setCreationTime(Instant instant) throws UncheckedIOException {
throw new UncheckedIOException(new IOException("CreationTime not supported"));
}
/**
* @return the {@link FileSystem} this Node belongs to
*/
@@ -9,6 +9,7 @@
package org.cryptomator.filesystem.delegating;
import java.io.UncheckedIOException;
import java.time.Instant;
import java.util.Optional;
import org.cryptomator.filesystem.File;
@@ -69,4 +70,14 @@ public abstract class DelegatingFile<D extends DelegatingFolder<D, ?>> extends D
}
}
@Override
public Optional<Instant> creationTime() throws UncheckedIOException {
return delegate.creationTime();
}
@Override
public void setCreationTime(Instant instant) throws UncheckedIOException {
delegate.setCreationTime(instant);
}
}
@@ -97,6 +97,11 @@ public abstract class DelegatingFolder<D extends DelegatingFolder<D, F>, F exten
}
}
@Override
public Optional<Instant> creationTime() throws UncheckedIOException {
return delegate.creationTime();
}
@Override
public void setCreationTime(Instant instant) throws UncheckedIOException {
delegate.setCreationTime(instant);