diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-05 13:11:43 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-05 13:11:43 -0700 |
| commit | 91da7057b1e4e0a623e2c2d273cce4a1426e69c1 (patch) | |
| tree | 75bdd6b586bc4c23dfc567461e16d5c2d4583e21 /weed/util/fullpath.go | |
| parent | 2d43f85577cb998656abf2525445b72fcd8cc48d (diff) | |
| download | seaweedfs-91da7057b1e4e0a623e2c2d273cce4a1426e69c1.tar.xz seaweedfs-91da7057b1e4e0a623e2c2d273cce4a1426e69c1.zip | |
refactoring
Diffstat (limited to 'weed/util/fullpath.go')
| -rw-r--r-- | weed/util/fullpath.go | 10 |
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...)) +} |
