MCPcopy
hub / github.com/sipeed/picoclaw / Store

Method Store

pkg/media/store.go:41–41  ·  view source on GitHub ↗

Store registers an existing local file under the given scope. Returns a ref identifier (e.g. "media:// "). Store does not move or copy the file; it only records the mapping. If meta.CleanupPolicy is empty, CleanupPolicyDeleteOnCleanup is assumed.

(localPath string, meta MediaMeta, scope string)

Source from the content-addressed store, hash-verified

39 // Store does not move or copy the file; it only records the mapping.
40 // If meta.CleanupPolicy is empty, CleanupPolicyDeleteOnCleanup is assumed.
41 Store(localPath string, meta MediaMeta, scope string) (ref string, err error)
42
43 // Resolve returns the local file path for a given ref.
44 Resolve(ref string) (localPath string, err error)

Implementers 1

FileMediaStorepkg/media/store.go

Calls

no outgoing calls