aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2/fullpath.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer2/fullpath.go')
-rw-r--r--weed/filer2/fullpath.go31
1 files changed, 0 insertions, 31 deletions
diff --git a/weed/filer2/fullpath.go b/weed/filer2/fullpath.go
deleted file mode 100644
index be6e34431..000000000
--- a/weed/filer2/fullpath.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package filer2
-
-import (
- "path/filepath"
- "strings"
-)
-
-type FullPath string
-
-func NewFullPath(dir, name string) FullPath {
- if strings.HasSuffix(dir, "/") {
- return FullPath(dir + name)
- }
- return FullPath(dir + "/" + name)
-}
-
-func (fp FullPath) DirAndName() (string, string) {
- dir, name := filepath.Split(string(fp))
- if dir == "/" {
- return dir, name
- }
- if len(dir) < 1 {
- return "/", ""
- }
- return dir[:len(dir)-1], name
-}
-
-func (fp FullPath) Name() string {
- _, name := filepath.Split(string(fp))
- return name
-}