Class StorageClient
- java.lang.Object
-
- io.appium.java_client.plugins.storage.StorageClient
-
public class StorageClient extends java.lang.Object
This is a Java implementation of the Appium server storage plugin client. See the plugin README for more details.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREFIX
-
Constructor Summary
Constructors Constructor Description StorageClient(java.net.URL baseUrl)
StorageClient(org.openqa.selenium.remote.http.ClientConfig clientConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.io.File file)
Adds a local file to the server storage.void
add(java.io.File file, java.lang.String name)
Adds a local file to the server storage.boolean
delete(java.lang.String name)
Deletes an item from the server storage.java.util.List<StorageItem>
list()
Lists items that exist in the storage.void
reset()
Resets all items of the server storage.
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
public void add(java.io.File file)
Adds a local file to the server storage. The remote file name is be set to the same value as the local file name.- Parameters:
file
- File instance.
-
add
public void add(java.io.File file, java.lang.String name)
Adds a local file to the server storage.- Parameters:
file
- File instance.name
- The remote file name.
-
list
public java.util.List<StorageItem> list()
Lists items that exist in the storage.- Returns:
- All storage items.
-
delete
public boolean delete(java.lang.String name)
Deletes an item from the server storage.- Parameters:
name
- The name of the item to be deleted.- Returns:
- true if the dletion was successful.
-
reset
public void reset()
Resets all items of the server storage.
-
-