Archived
Convenience functions for flag testing
This commit is contained in:
1 parent
7bc36cbbd1
commit
b60d648e22
6 files changed
+47
-19
No files matched your search
@@ -516,3 +516,19 @@ func (c *rawConnection) Statistics() Statistics {
|
||||
OutBytesTotal: int(c.cw.Tot()),
|
||||
}
|
||||
}
|
||||
|
||||
func IsDeleted(bits uint32) bool {
|
||||
return bits&FlagDeleted != 0
|
||||
}
|
||||
|
||||
func IsInvalid(bits uint32) bool {
|
||||
return bits&FlagInvalid != 0
|
||||
}
|
||||
|
||||
func IsDirectory(bits uint32) bool {
|
||||
return bits&FlagDirectory != 0
|
||||
}
|
||||
|
||||
func HasPermissionBits(bits uint32) bool {
|
||||
return bits&FlagNoPermBits == 0
|
||||
}
|
||||
Reference in new issue
Block a user