aboutsummaryrefslogtreecommitdiff
path: root/weed/util/fullpath.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-04-05 13:11:43 -0700
committerChris Lu <chris.lu@gmail.com>2020-04-05 13:11:43 -0700
commit91da7057b1e4e0a623e2c2d273cce4a1426e69c1 (patch)
tree75bdd6b586bc4c23dfc567461e16d5c2d4583e21 /weed/util/fullpath.go
parent2d43f85577cb998656abf2525445b72fcd8cc48d (diff)
downloadseaweedfs-91da7057b1e4e0a623e2c2d273cce4a1426e69c1.tar.xz
seaweedfs-91da7057b1e4e0a623e2c2d273cce4a1426e69c1.zip
refactoring
Diffstat (limited to 'weed/util/fullpath.go')
-rw-r--r--weed/util/fullpath.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/weed/util/fullpath.go b/weed/util/fullpath.go
index 413ee27bf..4ce8a2f90 100644
--- a/weed/util/fullpath.go
+++ b/weed/util/fullpath.go
@@ -47,6 +47,10 @@ 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
+func Join(names ...string) string {
+ return filepath.ToSlash(filepath.Join(names...))
+}
+
+func JoinPath(names ...string) FullPath {
+ return FullPath(Join(names...))
+}