package filesystem
import "github.com/docker/distribution/storagedriver/filesystem"
Index ¶
- type Driver
- func FromParameters(parameters map[string]interface{}) *Driver
- func New(rootDirectory string) *Driver
- func (d *Driver) Delete(subPath string) error
- func (d *Driver) GetContent(path string) ([]byte, error)
- func (d *Driver) List(subPath string) ([]string, error)
- func (d *Driver) Move(sourcePath string, destPath string) error
- func (d *Driver) PutContent(subPath string, contents []byte) error
- func (d *Driver) ReadStream(path string, offset int64) (io.ReadCloser, error)
- func (d *Driver) Stat(subPath string) (storagedriver.FileInfo, error)
- func (d *Driver) URLFor(path string, options map[string]interface{}) (string, error)
- func (d *Driver) WriteStream(subPath string, offset int64, reader io.Reader) (nn int64, err error)
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a storagedriver.StorageDriver implementation backed by a local filesystem. All provided paths will be subpaths of the RootDirectory
func FromParameters ¶
FromParameters constructs a new Driver with a given parameters map Optional Parameters: - rootdirectory
func New ¶
New constructs a new Driver with a given rootDirectory
func (*Driver) Delete ¶
Delete recursively deletes all objects stored at "path" and its subpaths.
func (*Driver) GetContent ¶
GetContent retrieves the content stored at "path" as a []byte.
func (*Driver) List ¶
List returns a list of the objects that are direct descendants of the given path.
func (*Driver) Move ¶
Move moves an object stored at sourcePath to destPath, removing the original object.
func (*Driver) PutContent ¶
PutContent stores the []byte content at a location designated by "path".
func (*Driver) ReadStream ¶
ReadStream retrieves an io.ReadCloser for the content stored at "path" with a given byte offset.
func (*Driver) Stat ¶
func (d *Driver) Stat(subPath string) (storagedriver.FileInfo, error)
Stat retrieves the FileInfo for the given path, including the current size in bytes and the creation time.
func (*Driver) URLFor ¶
URLFor returns a URL which may be used to retrieve the content stored at the given path. May return an UnsupportedMethodErr in certain StorageDriver implementations.
func (*Driver) WriteStream ¶
WriteStream stores the contents of the provided io.Reader at a location designated by the given path.
Source Files ¶
- Version
- v2.0.0-alpha.1+incompatible
- Published
- Jan 28, 2015
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 10 minutes ago –
Tools for package owners.