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

Method AddFiles

ent/storagepolicy_create.go:238–244  ·  view source on GitHub ↗

AddFiles adds the "files" edges to the File entity.

(f ...*File)

Source from the content-addressed store, hash-verified

236
237// AddFiles adds the "files" edges to the File entity.
238func (spc *StoragePolicyCreate) AddFiles(f ...*File) *StoragePolicyCreate {
239 ids := make([]int, len(f))
240 for i := range f {
241 ids[i] = f[i].ID
242 }
243 return spc.AddFileIDs(ids...)
244}
245
246// AddEntityIDs adds the "entities" edge to the Entity entity by IDs.
247func (spc *StoragePolicyCreate) AddEntityIDs(ids ...int) *StoragePolicyCreate {

Callers

nothing calls this directly

Calls 1

AddFileIDsMethod · 0.95

Tested by

no test coverage detected