(Quick Reference)
StorageProvider
Purpose
This is the base provider abstract class for defining various providers.
Examples
Below is an example of how a
LocalStorageProvider
might be initialized.
import com.bertramlabs.plugins.karman.local
def provider = new LocalStorageProvider(basePath: "/path/to/storage/location")//Shorthand
provider['folder']['example.txt'] = "This is a string i am storing in example.txt"
Description
The StorageProvider creates an interface that allows for defining different cloud providers.
To initialize a
LocalStorageProvider
all that is needed is a basePath on your filesystem:
getDirectories
- Fetches a list of directories / buckets.
getDirectory
- Fetches a specific directory or creatse a new instance of a directory.
getDefaultFileACL
- Fetches the Default File Access Control value for saving.
setDefaultFileACL
- Scope this specific provider instane to a default File Access Control Value.