feat(S3): add new file() method
This commit is contained in:
parent
fe15c748bc
commit
ddbb59b831
@ -5,6 +5,8 @@ import com.amazonaws.services.s3.model.S3ObjectSummary;
|
||||
|
||||
import org.cryptomator.util.Optional;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
class S3CloudNodeFactory {
|
||||
|
||||
private static final String SUFFIX = "/";
|
||||
@ -27,6 +29,10 @@ class S3CloudNodeFactory {
|
||||
return new S3File(parent, name, path, size, Optional.empty());
|
||||
}
|
||||
|
||||
public static S3File file(S3Folder parent, String name, Optional<Long> size, Optional<Date> lastModified) {
|
||||
return new S3File(parent, name, getNodePath(parent, name), size, lastModified);
|
||||
}
|
||||
|
||||
public static S3Folder folder(S3Folder parent, S3ObjectSummary folder) {
|
||||
String name = getNameFromKey(folder.getKey());
|
||||
return new S3Folder(parent, name, getNodePath(parent, name));
|
||||
|
Loading…
x
Reference in New Issue
Block a user