(Quick Reference)
LocalStorageProvider
Purpose
This is the base provider used to deal with files on the local filesystem.
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 LocalStorageProvider creates an interface that allows for file manipulation on the local file store. Karman also provides a url endpoint for serving these files in both a private and public context.
To initialize a
LocalStorageProvider
all that is needed is a basePath on your filesystem:
basePath
- Base storage path for files.