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

Method SetNillableFileID

ent/share_update.go:207–212  ·  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

205
206// SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
207func (su *ShareUpdate) SetNillableFileID(id *int) *ShareUpdate {
208 if id != nil {
209 su = su.SetFileID(*id)
210 }
211 return su
212}
213
214// SetFile sets the "file" edge to the File entity.
215func (su *ShareUpdate) SetFile(f *File) *ShareUpdate {

Callers

nothing calls this directly

Calls 1

SetFileIDMethod · 0.95

Tested by

no test coverage detected