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