MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / SetPrimaryEntity

Method SetPrimaryEntity

inventory/file.go:794–796  ·  view source on GitHub ↗
(ctx context.Context, file *ent.File, entity *ent.Entity)

Source from the content-addressed store, hash-verified

792}
793
794func (f *fileClient) SetPrimaryEntity(ctx context.Context, file *ent.File, entity *ent.Entity) error {
795 return f.client.File.UpdateOne(file).SetPrimaryEntity(entity.ID).SetSize(entity.Size).Exec(ctx)
796}
797
798func (f *fileClient) CreateFile(ctx context.Context, root *ent.File, args *CreateFileParameters) (*ent.File, *ent.Entity, StorageDiff, error) {
799 var defaultEntity *ent.Entity

Callers

nothing calls this directly

Calls 4

ExecMethod · 0.65
SetPrimaryEntityMethod · 0.65
SetSizeMethod · 0.45
UpdateOneMethod · 0.45

Tested by

no test coverage detected