26 lines
578 B
Go
26 lines
578 B
Go
|
package resolver
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"git.kmsign.ru/royalcat/tstor/daemons/atorrent/generated/graphql/model"
|
||
|
)
|
||
|
|
||
|
func (r *torrentFSResolver) Entries(ctx context.Context, obj *model.TorrentFs) ([]model.FsEntry, error) {
|
||
|
// entries, err := obj.FS.ReadDir(ctx, ".")
|
||
|
// if err != nil {
|
||
|
// return nil, err
|
||
|
// }
|
||
|
out := []model.FsEntry{}
|
||
|
// for _, e := range entries {
|
||
|
// entry, err := model.FillFsEntry(ctx, e, obj.FS, ".")
|
||
|
// if err != nil {
|
||
|
// return nil, err
|
||
|
// }
|
||
|
// out = append(out, entry)
|
||
|
// }
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
type torrentFSResolver struct{ *Resolver }
|