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

Method SetNillableFileID

ent/share_create.go:172–177  ·  view source on GitHub ↗

SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.

(id *int)

Source from the content-addressed store, hash-verified

170
171// SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
172func (sc *ShareCreate) SetNillableFileID(id *int) *ShareCreate {
173 if id != nil {
174 sc = sc.SetFileID(*id)
175 }
176 return sc
177}
178
179// SetFile sets the "file" edge to the File entity.
180func (sc *ShareCreate) SetFile(f *File) *ShareCreate {

Callers

nothing calls this directly

Calls 1

SetFileIDMethod · 0.95

Tested by

no test coverage detected