mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 21:57:59 +02:00
fs: add IsSet convenience method to Bits
This commit is contained in:
@ -114,6 +114,11 @@ func (b *Bits[C]) Set(s string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsSet returns true all the bits in mask are set in b.
|
||||
func (b Bits[C]) IsSet(mask Bits[C]) bool {
|
||||
return (b & mask) == mask
|
||||
}
|
||||
|
||||
// Type of the value.
|
||||
//
|
||||
// If C has a Type() string method then it will be used instead.
|
||||
|
Reference in New Issue
Block a user