mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-11 22:38:05 +01:00
added filesystem.Copy(src, dest)
This commit is contained in:
1 parent
99bdb4e701
commit
995733000f
3 files changed
+42
No files matched your search
@@ -117,6 +117,13 @@ func (s *System) GetFile(fileKey string) (*blob.Reader, error) {
|
||||
return br, nil
|
||||
}
|
||||
|
||||
// Copy copies the file stored at srcKey to dstKey.
|
||||
//
|
||||
// If dstKey file already exists, it is overwritten.
|
||||
func (s *System) Copy(srcKey, dstKey string) error {
|
||||
return s.bucket.Copy(s.ctx, dstKey, srcKey, nil)
|
||||
}
|
||||
|
||||
// List returns a flat list with info for all files under the specified prefix.
|
||||
func (s *System) List(prefix string) ([]*blob.ListObject, error) {
|
||||
files := []*blob.ListObject{}
|
||||
|
||||
Reference in new issue
Block a user