MCPcopy
hub / github.com/pocketbase/pocketbase / BaseFilesPath

Method BaseFilesPath

core/record_model.go:603–610  ·  view source on GitHub ↗

BaseFilesPath returns the storage dir path used by the record.

()

Source from the content-addressed store, hash-verified

601
602// BaseFilesPath returns the storage dir path used by the record.
603func (m *Record) BaseFilesPath() string {
604 id := cast.ToString(m.LastSavedPK())
605 if id == "" {
606 id = m.Id
607 }
608
609 return m.collection.BaseFilesPath() + "/" + id
610}
611
612// Original returns a shallow copy of the current record model populated
613// with its ORIGINAL db data state (aka. right after PostScan())

Callers 1

TestRecordBaseFilesPathFunction · 0.95

Calls 2

LastSavedPKMethod · 0.65
BaseFilesPathMethod · 0.65

Tested by 1

TestRecordBaseFilesPathFunction · 0.76