readMetaDataForPath reads the metadata from the path
(ctx context.Context, path string)
| 181 | |
| 182 | // readMetaDataForPath reads the metadata from the path |
| 183 | func (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 |
| 201 | func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, error) { |
no test coverage detected