fs

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package fs provided support for local file system.

Code generated by go generate via internal/cmd/service; DO NOT EDIT.

Index

Constants

StreamModeType is the stream mode type.

View Source
const Type = "fs"

Type is the type for fs

Variables

This section is empty.

Functions

func NewStorager added in v1.0.0

func NewStorager(pairs ...*types.Pair) (storage.Storager, error)

NewStorager will create Storager only.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage is the fs client.

func (*Storage) Copy

func (s *Storage) Copy(src, dst string, pairs ...*types.Pair) (err error)

Copy implements Storager.Copy

func (*Storage) CopyWithContext added in v0.6.0

func (s *Storage) CopyWithContext(ctx context.Context, src, dst string, pairs ...*types.Pair) (err error)

CopyWithContext adds context support for Copy.

func (*Storage) Delete

func (s *Storage) Delete(path string, pairs ...*types.Pair) (err error)

Delete implements Storager.Delete

func (*Storage) DeleteWithContext added in v0.6.0

func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)

DeleteWithContext adds context support for Delete.

func (*Storage) ListDir

func (s *Storage) ListDir(path string, pairs ...*types.Pair) (err error)

ListDir implements Storager.ListDir

func (*Storage) ListDirWithContext added in v1.0.0

func (s *Storage) ListDirWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)

ListDirWithContext adds context support for ListDir.

func (*Storage) Metadata

func (s *Storage) Metadata(pairs ...*types.Pair) (m info.StorageMeta, err error)

Metadata implements Storager.Metadata

func (*Storage) MetadataWithContext added in v0.6.0

func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...*types.Pair) (m info.StorageMeta, err error)

MetadataWithContext adds context support for Metadata.

func (*Storage) Move

func (s *Storage) Move(src, dst string, pairs ...*types.Pair) (err error)

Move implements Storager.Move

func (*Storage) MoveWithContext added in v0.6.0

func (s *Storage) MoveWithContext(ctx context.Context, src, dst string, pairs ...*types.Pair) (err error)

MoveWithContext adds context support for Move.

func (*Storage) Read

func (s *Storage) Read(path string, pairs ...*types.Pair) (r io.ReadCloser, err error)

Read implements Storager.Read

func (*Storage) ReadWithContext added in v0.6.0

func (s *Storage) ReadWithContext(ctx context.Context, path string, pairs ...*types.Pair) (r io.ReadCloser, err error)

ReadWithContext adds context support for Read.

func (*Storage) Stat

func (s *Storage) Stat(path string, pairs ...*types.Pair) (o *types.Object, err error)

Stat implements Storager.Stat

func (*Storage) StatWithContext added in v0.6.0

func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...*types.Pair) (o *types.Object, err error)

StatWithContext adds context support for Stat.

func (*Storage) String

func (s *Storage) String() string

String implements Storager.String

func (*Storage) Write

func (s *Storage) Write(path string, r io.Reader, pairs ...*types.Pair) (err error)

WriteFile implements Storager.WriteFile

func (*Storage) WriteWithContext added in v0.6.0

func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, pairs ...*types.Pair) (err error)

WriteWithContext adds context support for Write.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL