git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/Common/storagehub-client@176518 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0a094a5bc4
commit
351a7b2171
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue