// Convert a list item into a DirEntry
Convert a list item into a DirEntry
// Convert a list item into a DirEntry
func (f *Fs) itemToDirEntry(remote string, object *s3.Object, isDirectory bool) (fs.DirEntry, error) {
	if isDirectory {
		size := int64(0)
		if object.Size != nil {
			size = *object.Size
		}
		d := fs.NewDir(remote, time.Time{}).SetSize(size)
		return d, nil
	}
	o, err := f.newObjectWithInfo(remote, object)
	if err != nil {
		return nil, err
	}
	return o, nil
}
func ( f * Fs ) itemToDirEntry ( remote string , object * s3 . Object , isDirectory bool ) ( fs . DirEntry , error ) { if isDirectory { size := int64 ( 0 ) if object . Size != nil { size = * object . Size } d := fs . NewDir ( remote , time . Time { } ) . SetSize ( size ) return d , nil } o , err := f . newObjectWithInfo ( remote , object ) if err != nil { return nil , err } return o , nil }
Convert a list item into a DirEntry
Convert a list item into a DirEntry