Documentation
¶
Overview ¶
Package base is a base archive Fs
Index ¶
- type Fs
- func (f *Fs) Features() *fs.Features
- func (f *Fs) Hashes() hash.Set
- func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error)
- func (f *Fs) Mkdir(ctx context.Context, dir string) error
- func (f *Fs) Name() string
- func (f *Fs) NewObject(ctx context.Context, remote string) (o fs.Object, err error)
- func (f *Fs) Precision() time.Duration
- func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (o fs.Object, err error)
- func (f *Fs) Rmdir(ctx context.Context, dir string) error
- func (f *Fs) Root() string
- func (f *Fs) SetWrapper(wrapper fs.Fs)
- func (f *Fs) String() string
- func (f *Fs) UnWrap() fs.Fs
- func (f *Fs) WrapFs() fs.Fs
- type Object
- func (o *Object) Fs() fs.Info
- func (o *Object) Hash(ctx context.Context, ht hash.Type) (string, error)
- func (o *Object) ModTime(ctx context.Context) time.Time
- func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (rc io.ReadCloser, err error)
- func (o *Object) Remote() string
- func (o *Object) Remove(ctx context.Context) error
- func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error
- func (o *Object) Size() int64
- func (o *Object) Storable() bool
- func (o *Object) String() string
- func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fs ¶
type Fs struct {
// contains filtered or unexported fields
}
Fs represents a wrapped fs.Fs
func New ¶
New constructs an Fs from the (wrappedFs, remote) with the objects prefix with prefix and rooted at root
func (*Fs) List ¶
List the objects and directories in dir into entries. The entries can be returned in any order but should be for a complete directory.
dir should be "" to list the root, and should not have trailing slashes.
This should return ErrDirNotFound if the directory isn't found.
func (*Fs) Mkdir ¶
Mkdir makes the directory (container, bucket)
Shouldn't return an error if it already exists
func (*Fs) Put ¶
func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (o fs.Object, err error)
Put in to the remote path with the modTime given of the given size
May create the object even if it returns an error - if so will return the object and the error, otherwise will return nil and the error
func (*Fs) Rmdir ¶
Rmdir removes the directory (container, bucket) if empty
Return an error if it doesn't exist or isn't empty
func (*Fs) SetWrapper ¶
SetWrapper sets the Fs that is wrapping this Fs
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object describes an object to be read from the raw zip file
func (*Object) Hash ¶
Hash returns the selected checksum of the file If no checksum is available it returns ""
func (*Object) ModTime ¶
ModTime returns the modification time of the object
It attempts to read the objects mtime and if that isn't present the LastModified returned in the http headers
func (*Object) Open ¶
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (rc io.ReadCloser, err error)
Open opens the file for read. Call Close() on the returned io.ReadCloser
func (*Object) SetModTime ¶
SetModTime sets the modification time of the local fs object