This commit is contained in:
Lucio Lelii 2019-01-14 10:51:19 +00:00
parent 0a094a5bc4
commit 351a7b2171
1 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Arrays;
@ -177,8 +178,15 @@ public class Items {
public void downloadFile() {
StorageHubClient shc = new StorageHubClient();
StreamDescriptor descr = shc.open("6c5fb143-3711-4097-9bdc-952e41355440").asFile().
List<? extends Item> items = shc.getWSRoot().findByName("MyFo*").getItems();
for (Item item: items)
System.out.println(item.getName()+" "+item.getTitle()+" "+item.getClass().getSimpleName());
/*
URL link = shc.open("6c5fb143-3711-4097-9bdc-952e41355440").asFile().getPublicLink("1.1");
System.out.println(link.toString());
/*
File targetFile = new File("/tmp/"+descr.getFileName());
try {