aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_path.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/file_path.go')
-rw-r--r--hotline/file_path.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/hotline/file_path.go b/hotline/file_path.go
index a3a13f1..aba3195 100644
--- a/hotline/file_path.go
+++ b/hotline/file_path.go
@@ -98,6 +98,15 @@ func (fp *FilePath) IsUploadDir() bool {
return strings.Contains(strings.ToLower(string(fp.Items[fp.Len()-1].Name)), "upload")
}
+func (fp *FilePath) IsUserDir() bool {
+ if fp.Len() == 0 {
+ return false
+ }
+
+ return strings.HasPrefix(string(fp.Items[0].Name), "~")
+}
+
+
func (fp *FilePath) Len() uint16 {
return binary.BigEndian.Uint16(fp.ItemCount[:])
}