Debian Codegraph @

memfs/memory_option.go

raw symbols SCIP
1 package memfs
2
3 type Option func(*options)
4
5 type options struct {
6 umask uint32
7 }
8
9 // WithUmask sets the umask for the memfs filesystem. The umask controls the
10 // default permissions for newly created files and directories by clearing
11 // specified permission bits. If not set, defaults to 0o022.
12 func WithUmask(mask uint32) Option {
13 return func(o *options) {
14 o.umask = mask
15 }
16 }