MCPcopy
hub / github.com/pocketbase/pocketbase / GetReader

Method GetReader

tools/filesystem/filesystem.go:119–121  ·  view source on GitHub ↗

GetReader returns a file content reader for the given fileKey. NB! Make sure to call Close() on the file after you are done working with it. If the file doesn't exist returns ErrNotFound.

(fileKey string)

Source from the content-addressed store, hash-verified

117//
118// If the file doesn't exist returns ErrNotFound.
119func (s *System) GetReader(fileKey string) (*blob.Reader, error) {
120 return s.bucket.NewReader(s.ctx, fileKey)
121}
122
123// Deprecated: Please use GetReader(fileKey) instead.
124func (s *System) GetFile(fileKey string) (*blob.Reader, error) {

Callers 8

GetFileMethod · 0.95
GetReuploadableFileMethod · 0.95
ServeMethod · 0.95
CreateThumbMethod · 0.95
TestFileSystemGetReaderFunction · 0.80
TestFileSystemCopyFunction · 0.80
RestoreBackupMethod · 0.80

Calls 1

NewReaderMethod · 0.80

Tested by 3

TestFileSystemGetReaderFunction · 0.64
TestFileSystemCopyFunction · 0.64