public interface FilesService
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<java.lang.Void> |
copy(java.lang.String source,
java.lang.String target)
Copies a file or a folder (recursively).
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
delete(java.lang.String path)
Deletes a file, or a folder.
|
java.util.concurrent.CompletableFuture<java.io.Reader> |
getDownloadReader(java.lang.String path) |
java.util.concurrent.CompletableFuture<java.io.InputStream> |
getDownloadStream(java.lang.String path)
Initiates a download sequence by returning a Reader or InputStream object that can
be used to read the download file in chunks.
|
java.util.concurrent.CompletableFuture<java.io.OutputStream> |
getUploadStream(java.lang.String path)
Initiates an upload sequence by returning a Write or OutputStream object that can be
used to write small file chunks.
|
java.util.concurrent.CompletableFuture<java.io.Writer> |
getUploadWriter(java.lang.String path) |
java.util.concurrent.CompletableFuture<java.lang.String> |
hash(java.lang.String path)
Returns the SHA256 hash of the given file.
|
java.util.concurrent.CompletableFuture<java.util.List<FileInfo>> |
list(java.lang.String path)
Returns the list of all files in a given folder.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
move(java.lang.String source,
java.lang.String target)
Moves (or renames) a file or folder.
|
java.util.concurrent.CompletableFuture<FileInfo> |
stat(java.lang.String path)
Information about the target file or folder.
|
java.util.concurrent.CompletableFuture<java.io.OutputStream> getUploadStream(java.lang.String path)
path - the path for the remote filejava.util.concurrent.CompletableFuture<java.io.Writer> getUploadWriter(java.lang.String path)
java.util.concurrent.CompletableFuture<java.io.InputStream> getDownloadStream(java.lang.String path)
path - the path for the remote filejava.util.concurrent.CompletableFuture<java.io.Reader> getDownloadReader(java.lang.String path)
java.util.concurrent.CompletableFuture<java.util.List<FileInfo>> list(java.lang.String path)
path - the path for the remote folderjava.util.concurrent.CompletableFuture<FileInfo> stat(java.lang.String path)
path - the path for the remote file or folderjava.util.concurrent.CompletableFuture<java.lang.String> hash(java.lang.String path)
path - path for the remote filejava.util.concurrent.CompletableFuture<java.lang.Void> move(java.lang.String source,
java.lang.String target)
source - the path to the file or folder to movetarget - the path to the target file or folderjava.util.concurrent.CompletableFuture<java.lang.Void> copy(java.lang.String source,
java.lang.String target)
source - the path for the remote source file or foldertarget - the path for the remote destination file or folderjava.util.concurrent.CompletableFuture<java.lang.Void> delete(java.lang.String path)
path - the path for the remote file or folder