Rename NewFsObject to NewObject
This commit is contained in:
+7
-7
@@ -243,7 +243,7 @@ func (f *Fs) list(dir string, fn listFn) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// List walks the path returning a channel of FsObjects
|
||||
// List walks the path returning a channel of Objects
|
||||
func (f *Fs) List(out fs.ListOpts, dir string) {
|
||||
defer out.Finished()
|
||||
|
||||
@@ -263,7 +263,7 @@ func (f *Fs) List(out fs.ListOpts, dir string) {
|
||||
return fs.ErrorListAborted
|
||||
}
|
||||
} else {
|
||||
if o := f.newFsObjectWithInfo(remote, object); o != nil {
|
||||
if o := f.newObjectWithInfo(remote, object); o != nil {
|
||||
if out.Add(o) {
|
||||
return fs.ErrorListAborted
|
||||
}
|
||||
@@ -295,17 +295,17 @@ func (f *Fs) List(out fs.ListOpts, dir string) {
|
||||
}
|
||||
}
|
||||
|
||||
// NewFsObject returns an Object from a path
|
||||
// NewObject returns an Object from a path
|
||||
//
|
||||
// May return nil if an error occurred
|
||||
func (f *Fs) NewFsObject(remote string) fs.Object {
|
||||
return f.newFsObjectWithInfo(remote, nil)
|
||||
func (f *Fs) NewObject(remote string) fs.Object {
|
||||
return f.newObjectWithInfo(remote, nil)
|
||||
}
|
||||
|
||||
// Return an FsObject from a path
|
||||
// Return an Object from a path
|
||||
//
|
||||
// May return nil if an error occurred
|
||||
func (f *Fs) newFsObjectWithInfo(remote string, info *yandex.ResourceInfoResponse) fs.Object {
|
||||
func (f *Fs) newObjectWithInfo(remote string, info *yandex.ResourceInfoResponse) fs.Object {
|
||||
o := &Object{
|
||||
fs: f,
|
||||
remote: remote,
|
||||
|
||||
Reference in New Issue
Block a user