aboutsummaryrefslogtreecommitdiff
path: root/weed/util/fullpath.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-05 12:40:46 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-05 12:40:46 -0700
commit7bc3c935122fb6aa5e0e64612d6dc568aeac6a41 (patch)
treeb58c0755ee9081504734988692f094afb6184b50 /weed/util/fullpath.go
parentaf1f64d2448dc0fa6271533d1ad69ad9cd77c066 (diff)
downloadseaweedfs-7bc3c935122fb6aa5e0e64612d6dc568aeac6a41.tar.xz
seaweedfs-7bc3c935122fb6aa5e0e64612d6dc568aeac6a41.zip
add util.PathJoin
Diffstat (limited to 'weed/util/fullpath.go')
-rw-r--r--weed/util/fullpath.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go
index 7f7a77734..413ee27bf 100644
--- a/weed/util/fullpath.go
+++ b/weed/util/fullpath.go
@@ -46,3 +46,7 @@ func (fp FullPath) Split() []string {
}
return strings.Split(string(fp)[1:], "/")
}
+
+func PathJoin(dir, name string) string {
+ return filepath.ToSlash(filepath.Join(dir, name))
+} \ No newline at end of file