Documentation
¶
Index ¶
- Variables
- type App
- func (a *App) CreateDir(name string) error
- func (a *App) Info(pathname string) (provider.StorageItem, error)
- func (a *App) List(pathname string) ([]provider.StorageItem, error)
- func (a *App) ReaderFrom(pathname string) (provider.ReadSeekerCloser, error)
- func (a *App) Remove(pathname string) error
- func (a *App) Rename(oldName, newName string) error
- func (a *App) Store(pathname string, content io.ReadCloser) error
- func (a *App) UpdateDate(pathname string, date time.Time) error
- func (a *App) Walk(pathname string, walkFn func(provider.StorageItem, error) error) error
- func (a *App) WithIgnoreFn(ignoreFn func(provider.StorageItem) bool)
- func (a *App) WriterTo(pathname string) (io.WriteCloser, error)
- type ByHybridSort
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRelativePath occurs when path is relative (contains ".."") ErrRelativePath = errors.New("pathname contains relatives paths") )
Functions ¶
This section is empty.
Types ¶
type App ¶ added in v0.8.0
type App struct {
// contains filtered or unexported fields
}
App of the package
func (*App) Info ¶ added in v0.8.0
func (a *App) Info(pathname string) (provider.StorageItem, error)
Info provide metadata about given pathname
func (*App) List ¶ added in v0.8.0
func (a *App) List(pathname string) ([]provider.StorageItem, error)
List items in the storage
func (*App) ReaderFrom ¶ added in v0.8.0
func (a *App) ReaderFrom(pathname string) (provider.ReadSeekerCloser, error)
ReaderFrom reads content from given pathname
func (*App) Store ¶ added in v0.8.0
func (a *App) Store(pathname string, content io.ReadCloser) error
Store file to storage
func (*App) UpdateDate ¶ added in v0.8.0
UpdateDate update date from given value
func (*App) WithIgnoreFn ¶ added in v0.8.0
func (a *App) WithIgnoreFn(ignoreFn func(provider.StorageItem) bool)
WithIgnoreFn create a new App with given ignoreFn
type ByHybridSort ¶
type ByHybridSort []provider.StorageItem
ByHybridSort implements Sorter by type, name then modification time
func (ByHybridSort) Len ¶
func (a ByHybridSort) Len() int
func (ByHybridSort) Less ¶
func (a ByHybridSort) Less(i, j int) bool
func (ByHybridSort) Swap ¶
func (a ByHybridSort) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.