MCPcopy
hub / github.com/cloudreve/cloudreve / UpdateProps

Method UpdateProps

inventory/file.go:305–314  ·  view source on GitHub ↗
(ctx context.Context, file *ent.File, props *types.FileProps)

Source from the content-addressed store, hash-verified

303}
304
305func (f *fileClient) UpdateProps(ctx context.Context, file *ent.File, props *types.FileProps) (*ent.File, error) {
306 file, err := f.client.File.UpdateOne(file).
307 SetProps(props).
308 Save(ctx)
309 if err != nil {
310 return nil, err
311 }
312
313 return file, nil
314}
315
316func (f *fileClient) CountByTimeRange(ctx context.Context, start, end *time.Time) (int, error) {
317 if start == nil || end == nil {

Callers

nothing calls this directly

Calls 3

SaveMethod · 0.45
SetPropsMethod · 0.45
UpdateOneMethod · 0.45

Tested by

no test coverage detected