Documentation ¶
Overview ¶
Package storageos implements an os-backed storage Bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReadBucketCloser ¶ added in v0.9.0
func NewReadBucketCloser(rootPath string) (storage.ReadBucketCloser, error)
NewReadBucketCloser returns a new read-only OS bucket.
It is better to use this if you want to make sure your callers are not writing to the filesystem.
Only regular files are handled, that is Exists should only be called for regular files, Get and Put only work for regular files, Put automatically calls Mkdir, and Walk only calls f on regular files.
Not thread-safe.
func NewReadWriteBucketCloser ¶ added in v0.9.0
func NewReadWriteBucketCloser(rootPath string) (storage.ReadWriteBucketCloser, error)
NewReadWriteBucketCloser returns a new OS bucket.
Only regular files are handled, that is Exists should only be called for regular files, Get and Put only work for regular files, Put automatically calls Mkdir, and Walk only calls f on regular files.
Not thread-safe.
Types ¶
This section is empty.