MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / AddFile

Method AddFile

ent/entity_create.go:151–157  ·  view source on GitHub ↗

AddFile adds the "file" edges to the File entity.

(f ...*File)

Source from the content-addressed store, hash-verified

149
150// AddFile adds the "file" edges to the File entity.
151func (ec *EntityCreate) AddFile(f ...*File) *EntityCreate {
152 ids := make([]int, len(f))
153 for i := range f {
154 ids[i] = f[i].ID
155 }
156 return ec.AddFileIDs(ids...)
157}
158
159// SetUserID sets the "user" edge to the User entity by ID.
160func (ec *EntityCreate) SetUserID(id int) *EntityCreate {

Callers 2

CopyMethod · 0.45
CreateEntityMethod · 0.45

Calls 1

AddFileIDsMethod · 0.95

Tested by

no test coverage detected