aboutsummaryrefslogtreecommitdiff
path: root/s3_fs.go
diff options
context:
space:
mode:
Diffstat (limited to 's3_fs.go')
-rw-r--r--s3_fs.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/s3_fs.go b/s3_fs.go
index ecade9f..923240e 100644
--- a/s3_fs.go
+++ b/s3_fs.go
@@ -3,7 +3,10 @@ package main
import (
"context"
"errors"
+ "io"
"os"
+ "path"
+ "strings"
"time"
"github.com/minio/minio-go/v7"
@@ -30,7 +33,14 @@ func NewS3FS(mc *minio.Client) S3FS {
func (s S3FS) Mkdir(ctx context.Context, name string, perm os.FileMode) error {
s.ctx = ctx
- return errors.New("Not implemented Mkdir")
+ f, err := NewS3File(&s, path.Join(name, ".bagage"))
+ if err != nil {
+ return err
+ }
+ defer f.Close()
+
+ _, err = io.Copy(f, strings.NewReader("This is a placeholder"))
+ return nil
}
func (s S3FS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) {