MCPcopy
hub / github.com/rclone/rclone / readMetaDataForPath

Method readMetaDataForPath

backend/filescom/filescom.go:183–198  ·  view source on GitHub ↗

readMetaDataForPath reads the metadata from the path

(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

181
182// readMetaDataForPath reads the metadata from the path
183func (f *Fs) readMetaDataForPath(ctx context.Context, path string) (info *files_sdk.File, err error) {
184 params := files_sdk.FileFindParams{
185 Path: f.absPath(path),
186 }
187
188 var file files_sdk.File
189 err = f.pacer.Call(func() (bool, error) {
190 file, err = f.fileClient.Find(params, files_sdk.WithContext(ctx))
191 return shouldRetry(ctx, err)
192 })
193 if err != nil {
194 return nil, err
195 }
196
197 return &file, nil
198}
199
200// NewFs constructs an Fs from the path, container:path
201func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, error) {

Callers 4

NewFsFunction · 0.95
moveMethod · 0.95
DirMoveMethod · 0.95
readMetaDataMethod · 0.45

Calls 4

absPathMethod · 0.95
shouldRetryFunction · 0.70
CallMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected