import "github.com/ncw/rclone/backend/dropbox"
Package dropbox provides an interface to Dropbox object storage
NewFs constructs an Fs from the path, container:path
type Fs struct {
// contains filtered or unexported fields
}
Fs represents a remote dropbox server
About gets quota information
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
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 returns the precision
func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration, unlink bool) (link string, err error)
PublicLink adds a "readable by anyone with link" permission on the given file or folder.
Purge deletes all the files and the container
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 dropbox object
Dropbox Objects always have full metadata
Fs returns the parent Fs
Hash returns the dropbox special hash
ID returns the object id
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 { ChunkSize fs.SizeSuffix `config:"chunk_size"` Impersonate string `config:"impersonate"` bool `config:"shared_files"` bool `config:"shared_folders"` Enc encoder.MultiEncoder `config:"encoding"` }
Options defines the configuration for this backend
Path | Synopsis |
---|---|
dbhash | Package dbhash implements the dropbox hash as described in |
Package dropbox imports 30 packages (graph) and is imported by 2 packages. Updated 2021-01-23. Refresh now. Tools for package owners.