NewObject finds file at remote or return fs.ErrorObjectNotFound
(ctx context.Context, remote string)
| 169 | |
| 170 | // NewObject finds file at remote or return fs.ErrorObjectNotFound |
| 171 | func (f *Fs) NewObject(ctx context.Context, remote string) (fs.Object, error) { |
| 172 | realpath := f.realpath(remote) |
| 173 | fs.Debugf(f, "new [%s]", realpath) |
| 174 | |
| 175 | info, err := f.ensureFile(realpath) |
| 176 | if err != nil { |
| 177 | return nil, err |
| 178 | } |
| 179 | |
| 180 | return &Object{ |
| 181 | fs: f, |
| 182 | remote: remote, |
| 183 | size: info.Size(), |
| 184 | modTime: info.ModTime(), |
| 185 | }, nil |
| 186 | } |
| 187 | |
| 188 | // List the objects and directories in dir into entries. |
| 189 | func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err error) { |
nothing calls this directly
no test coverage detected