StorageProvider

interface StorageProvider

Storage services are provided to the SudoSiteReputationClient by classes that implement this interface.

Since

2021-01-04

Functions

Link copied to clipboard
abstract fun delete(fileName: String): Boolean

Delete a file.

Link copied to clipboard
abstract fun deleteFileETag(fileName: String): Boolean

Delete the eTag of a file.

Link copied to clipboard
abstract fun deleteFileETags()

Delete all the file eTags managed by the StorageProvider.

Link copied to clipboard
abstract fun deleteFiles()

Delete all the files managed by the StorageProvider.

Link copied to clipboard
abstract fun getFile(fileName: String): File

Gets the File of a file.

Link copied to clipboard
abstract fun listFiles(): List<String>

List all the files in the storage provider.

Link copied to clipboard
abstract fun read(fileName: String): ByteArray?

Reads all the bytes from a file.

Link copied to clipboard
abstract fun readFileETag(fileName: String): String?

Reads the eTag of a file, returns null if the file does not exist.

Link copied to clipboard
abstract fun write(fileName: String, data: ByteArray)

Writes all the bytes to a file.

Link copied to clipboard
abstract fun writeFileETag(fileName: String, eTag: String)

Writes the eTag of a file.