Object is a generic file like object that stores basic information about it
| 22 | |
| 23 | // Object is a generic file like object that stores basic information about it |
| 24 | type 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 |
| 43 | func NewObject(f *Fs, remote string) *Object { |
nothing calls this directly
no outgoing calls
no test coverage detected