Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( ErrRelativePath = errors.New("name contains relatives paths") ErrInvalidPath = errors.New("name is invalid") )
Functions ¶
func ErrNotExist ¶
func IsNotExist ¶
Types ¶
type Item ¶
type Item struct { Date time.Time `json:"date" msg:"date"` ID string `json:"id" msg:"id"` NameValue string `json:"name" msg:"name"` Pathname string `json:"pathname" msg:"pathname"` Extension string `json:"extension" msg:"extension"` SizeValue int64 `json:"size" msg:"size"` FileMode os.FileMode `json:"fileMode" msg:"fileMode"` IsDirValue bool `json:"isDir" msg:"isDir"` }
type ReadAtSeekCloser ¶ added in v1.4.4
type ReadAtSeekCloser interface { io.ReadSeekCloser io.ReaderAt }
type Storage ¶
type Storage interface { Stat(ctx context.Context, name string) (Item, error) Mkdir(ctx context.Context, name string, perm os.FileMode) error Rename(ctx context.Context, oldName, newName string) error RemoveAll(ctx context.Context, name string) error Enabled() bool Name() string WithIgnoreFn(ignoreFn func(Item) bool) Storage Path(name string) string List(ctx context.Context, name string) ([]Item, error) WriteTo(ctx context.Context, name string, reader io.Reader, opts WriteOpts) error ReadFrom(ctx context.Context, name string) (ReadAtSeekCloser, error) Walk(ctx context.Context, name string, walkFn func(Item) error) error UpdateDate(ctx context.Context, name string, date time.Time) error ConvertError(err error) error }
Click to show internal directories.
Click to hide internal directories.