aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/filer_util.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-11-13 15:34:38 +0800
committerGitHub <noreply@github.com>2020-11-13 15:34:38 +0800
commite0d5207ed9ff6350e83497586ac9859d841a711a (patch)
tree5fa024e1108a53af325a79f09c0aadd63b41fb3b /weed/s3api/filer_util.go
parenta38efe2e7baf34cb074c9db095f7db50de0fa156 (diff)
parenta2962604ad0bf83b26c692c72ddd40e648fb804d (diff)
downloadseaweedfs-e0d5207ed9ff6350e83497586ac9859d841a711a.tar.xz
seaweedfs-e0d5207ed9ff6350e83497586ac9859d841a711a.zip
Merge pull request #36 from chrislusf/master
sync
Diffstat (limited to 'weed/s3api/filer_util.go')
-rw-r--r--weed/s3api/filer_util.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/filer_util.go b/weed/s3api/filer_util.go
index ebdbe8245..b6ac52c80 100644
--- a/weed/s3api/filer_util.go
+++ b/weed/s3api/filer_util.go
@@ -7,6 +7,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
+ "github.com/chrislusf/seaweedfs/weed/util"
)
func (s3a *S3ApiServer) mkdir(parentDirectoryPath string, dirName string, fn func(entry *filer_pb.Entry)) error {
@@ -75,6 +76,11 @@ func (s3a *S3ApiServer) exists(parentDirectoryPath string, entryName string, isD
}
+func (s3a *S3ApiServer) getEntry(parentDirectoryPath, entryName string) (entry *filer_pb.Entry, err error) {
+ fullPath := util.NewFullPath(parentDirectoryPath, entryName)
+ return filer_pb.GetEntry(s3a, fullPath)
+}
+
func objectKey(key *string) *string {
if strings.HasPrefix(*key, "/") {
t := (*key)[1:]