MCPcopy
hub / github.com/rclone/rclone / readMetaData

Method readMetaData

backend/filescom/filescom.go:749–761  ·  view source on GitHub ↗

readMetaData gets the metadata if it hasn't already been fetched it also sets the info

(ctx context.Context)

Source from the content-addressed store, hash-verified

747//
748// it also sets the info
749func (o *Object) readMetaData(ctx context.Context) (err error) {
750 file, err := o.fs.readMetaDataForPath(ctx, o.remote)
751 if err != nil {
752 if files_sdk.IsNotExist(err) {
753 return fs.ErrorObjectNotFound
754 }
755 return err
756 }
757 if file.IsDir() {
758 return fs.ErrorIsDir
759 }
760 return o.setMetaData(file)
761}
762
763// ModTime returns the modification time of the object
764//

Callers 3

newObjectWithInfoMethod · 0.95
UpdateMethod · 0.95
CopyMethod · 0.45

Calls 3

setMetaDataMethod · 0.95
readMetaDataForPathMethod · 0.45
IsDirMethod · 0.45

Tested by

no test coverage detected