MCPcopy
hub / github.com/rclone/rclone / Object

Struct Object

backend/cache/object.go:24–40  ·  view source on GitHub ↗

Object is a generic file like object that stores basic information about it

Source from the content-addressed store, hash-verified

22
23// Object is a generic file like object that stores basic information about it
24type Object struct {
25 fs.Object `json:"-"`
26
27 ParentFs fs.Fs `json:"-"` // parent fs
28 CacheFs *Fs `json:"-"` // cache fs
29 Name string `json:"name"` // name of the directory
30 Dir string `json:"dir"` // abs path of the object
31 CacheModTime int64 `json:"modTime"` // modification or creation time - IsZero for unknown
32 CacheSize int64 `json:"size"` // size of directory and contents or -1 if unknown
33 CacheStorable bool `json:"storable"` // says whether this object can be stored
34 CacheType string `json:"cacheType"`
35 CacheTs time.Time `json:"cacheTs"`
36 cacheHashesMu sync.Mutex
37 CacheHashes map[hash.Type]string // all supported hashes cached
38
39 refreshMutex sync.Mutex
40}
41
42// NewObject builds one from a generic fs.Object
43func NewObject(f *Fs, remote string) *Object {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected