buf: github.com/bufbuild/buf/internal/pkg/storage/storageos Index | Files

package storageos

import "github.com/bufbuild/buf/internal/pkg/storage/storageos"

Package storageos implements an os-backed storage Bucket.

Index

Package Files

bucket.go storageos.go

Constants

const BucketType = "os"

BucketType = the bucket type.

func IsNotDir Uses

func IsNotDir(err error) bool

IsNotDir returns true for a Error 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 Uses

func NewBucket(rootPath string) (storage.Bucket, error)

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 Uses

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.

Package storageos imports 9 packages (graph). Updated 2019-12-14. Refresh now. Tools for package owners.