Closed Finni123 closed 2 years ago
@Finni123 ,
PCloudApiClient.loadFile()
. PCloudApiClient.loadFolder()
.PCloudApiClient.download()
.
Two of the variants will open and return a BufferedSource
(see Okio's docs) streams which you can use to read the contents of a remote (@PCloud) file to some arbitrary destination as you please. The other download()overloads accept a DataSink
, which is an abstraction over a destination for the bytes of the file to be downloaded. There is a factory method that accepts a java.io.File
as a destination, you can also roll your own implementation.
There is no way to properly download an Image on android, or am I missing something really obvious?
stat
andmetadata
don't exist in the Java API Client and I need them for this. The java sample uses aFile
for this, but unfortunately, that doesn't work on android since the pcloud files don't appear in the regular folder structure, thus I have to use the API.(Also,
getthumb
would be great, too)