Skip to content

Commit

Permalink
Add comment to describe WriteMode mask starting point
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Nov 20, 2024
1 parent f0aa673 commit cf84dec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/filer/filer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type WriteMode int
const writeModePerm = WriteMode(fs.ModePerm)

const (
// Note: these constants are defined as powers of 2 to support combining them using a bit-wise OR.
// They starts from the 10th bit (permission mask + 1) to avoid conflicts with the permission bits.
OverwriteIfExists WriteMode = (writeModePerm + 1) << iota
CreateParentDirectories
)
Expand Down

0 comments on commit cf84dec

Please sign in to comment.