MCPcopy
hub / github.com/cloudreve/cloudreve / GetChildFile

Method GetChildFile

inventory/file.go:1016–1024  ·  view source on GitHub ↗
(ctx context.Context, root *ent.File, ownerID int, child string, eagerLoading bool)

Source from the content-addressed store, hash-verified

1014}
1015
1016func (f *fileClient) GetChildFile(ctx context.Context, root *ent.File, ownerID int, child string, eagerLoading bool) (*ent.File, error) {
1017 query := f.childFileQuery(ownerID, false, root)
1018 if eagerLoading {
1019 query = withFileEagerLoading(ctx, query)
1020 }
1021
1022 return query.
1023 Where(file.Name(child)).First(ctx)
1024}
1025
1026func (f *fileClient) GetChildFiles(ctx context.Context, args *ListFileParameters, ownerID int, roots ...*ent.File) (*ListFileResult, error) {
1027 rawQuery := f.childFileQuery(ownerID, args.SharedWithMe, roots...)

Callers

nothing calls this directly

Calls 5

childFileQueryMethod · 0.95
NameFunction · 0.92
withFileEagerLoadingFunction · 0.85
FirstMethod · 0.45
WhereMethod · 0.45

Tested by

no test coverage detected