Interface PackagesStorage
-
public interface PackagesStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>closeAsync()Close storage asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>deleteAsync(java.lang.String path)Delete a file.java.util.concurrent.CompletableFuture<java.lang.Boolean>existAsync(java.lang.String path)Check the file is or not exists.voidinitialize()Initialize the packages management service with the given storage.java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>>listAsync(java.lang.String path)List all the file under a path.java.util.concurrent.CompletableFuture<java.lang.Void>readAsync(java.lang.String path, java.io.OutputStream outputStream)Read a file to a output stream.java.util.concurrent.CompletableFuture<java.lang.Void>writeAsync(java.lang.String path, java.io.InputStream inputStream)Write a input stream to a path.
-
-
-
Method Detail
-
initialize
void initialize()
Initialize the packages management service with the given storage.
-
writeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> writeAsync(java.lang.String path, java.io.InputStream inputStream)Write a input stream to a path.- Parameters:
path- file pathinputStream- the input file stream- Returns:
-
readAsync
java.util.concurrent.CompletableFuture<java.lang.Void> readAsync(java.lang.String path, java.io.OutputStream outputStream)Read a file to a output stream.- Parameters:
path- file pathoutputStream- the output file stream- Returns:
-
deleteAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync(java.lang.String path)
Delete a file.- Parameters:
path- file path- Returns:
-
listAsync
java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listAsync(java.lang.String path)
List all the file under a path.- Parameters:
path- file path- Returns:
-
existAsync
java.util.concurrent.CompletableFuture<java.lang.Boolean> existAsync(java.lang.String path)
Check the file is or not exists.- Parameters:
path- file path- Returns:
-
closeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
Close storage asynchronously.- Returns:
-
-