Add comment to describe WriteMode mask starting point

This commit is contained in:
Pieter Noordhuis 2024-11-20 10:31:19 +01:00
parent 2bcd212531
commit ce5df8f12e
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
1 changed files with 2 additions and 0 deletions

View File

@ -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
)