Directory is a generic dir that stores basic information about it
| 12 | |
| 13 | // Directory is a generic dir that stores basic information about it |
| 14 | type Directory struct { |
| 15 | Directory fs.Directory `json:"-"` // can be nil |
| 16 | |
| 17 | CacheFs *Fs `json:"-"` // cache fs |
| 18 | Name string `json:"name"` // name of the directory |
| 19 | Dir string `json:"dir"` // abs path of the directory |
| 20 | CacheModTime int64 `json:"modTime"` // modification or creation time - IsZero for unknown |
| 21 | CacheSize int64 `json:"size"` // size of directory and contents or -1 if unknown |
| 22 | |
| 23 | CacheItems int64 `json:"items"` // number of objects or -1 for unknown |
| 24 | CacheType string `json:"cacheType"` // object type |
| 25 | CacheTs *time.Time `json:",omitempty"` |
| 26 | } |
| 27 | |
| 28 | // NewDirectory builds an empty dir which will be used to unmarshal data in it |
| 29 | func NewDirectory(f *Fs, remote string) *Directory { |
nothing calls this directly
no outgoing calls
no test coverage detected