Documentation ¶
Overview ¶
Package storageos implements an os-backed storage Bucket.
Index ¶
Constants ¶
const BucketType = "os"
BucketType = the bucket type.
Variables ¶
This section is empty.
Functions ¶
func IsNotDir ¶
IsNotDir returns true for a PathError that is for a root path not being a directory.
This is only returned when creating a Bucket, or when putting a file into a directory path - paths within buckets are all regular files.
func NewBucket ¶
NewBucket 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.
func NewReadBucket ¶
func NewReadBucket(rootPath string) (storage.ReadBucket, error)
NewReadBucket 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.
Types ¶
This section is empty.