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

Method AddFile

ent/entity_update.go:212–218  ·  view source on GitHub ↗

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

(f ...*File)

Source from the content-addressed store, hash-verified

210
211// AddFile adds the "file" edges to the File entity.
212func (eu *EntityUpdate) AddFile(f ...*File) *EntityUpdate {
213 ids := make([]int, len(f))
214 for i := range f {
215 ids[i] = f[i].ID
216 }
217 return eu.AddFileIDs(ids...)
218}
219
220// SetUserID sets the "user" edge to the User entity by ID.
221func (eu *EntityUpdate) SetUserID(id int) *EntityUpdate {

Callers

nothing calls this directly

Calls 1

AddFileIDsMethod · 0.95

Tested by

no test coverage detected