import "github.com/ncw/rclone/backend/yandex"
NewFs constructs an Fs from the path, container:path
type Fs struct {
// contains filtered or unexported fields
}
Fs represents a remote yandex
About gets quota information
CleanUp permanently deletes all trashed files/folders
Copy src to this remote using server-side copy operations.
It returns the destination Object and a possible error
Will only be called if src.Fs().Name() == f.Name()
If it isn't possible then return fs.ErrorCantCopy
CreateDir makes a directory
DirMove moves src, srcRemote to this remote at dstRemote using server-side move operations.
Will only be called if src.Fs().Name() == f.Name()
If it isn't possible then return fs.ErrorCantDirMove
If destination exists then return fs.ErrorDirExists
Features returns the optional features of this Fs
Hashes returns the supported hash sets.
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.
Mkdir creates the container if it doesn't exist
Move src to this remote using server-side move operations.
It returns the destination Object and a possible error
Will only be called if src.Fs().Name() == f.Name()
If it isn't possible then return fs.ErrorCantMove
Name of the remote (as passed into NewFs)
NewObject finds the Object at remote. If it can't be found it returns the error fs.ErrorObjectNotFound.
Precision return the precision of this Fs
func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration, unlink bool) (link string, err error)
PublicLink generates a public link to the remote path (usually readable by anyone)
Purge deletes all the files in the directory
Optional interface: Only implement this if you have a way of deleting all the files quicker than just running Remove() on the result of List()
func (f *Fs) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)
Put the object
The new object may have been created if an error is returned
func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)
PutStream uploads to the remote path with the modTime given of indeterminate size
Rmdir deletes the container
Returns an error if it isn't empty
Root of the remote (as passed into NewFs)
String converts this Fs to a string
type Object struct {
// contains filtered or unexported fields
}
Object describes a swift object
Fs returns the parent Fs
Hash returns the Md5sum of an object returning a lowercase hex string
MimeType of an Object if known, "" otherwise
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 (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error)
Open an object for read
Remote returns the remote path
Remove an object
SetModTime sets the modification time of the local fs object
Commits the datastore
Size returns the size of an object in bytes
Storable returns whether this object is storable
Return a string version
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error
Update the already existing object
The new object may have been created if an error is returned
type Options struct { Token string `config:"token"` Enc encoder.MultiEncoder `config:"encoding"` }
Options defines the configuration for this backend
Path | Synopsis |
---|---|
api |
Package yandex imports 26 packages (graph) and is imported by 2 packages. Updated 2021-01-22. Refresh now. Tools for package owners.