(mode os.FileMode)
| 30 | } |
| 31 | |
| 32 | func goModeToUnixMode(mode os.FileMode) uint32 { |
| 33 | unixmode := uint32(mode.Perm()) |
| 34 | |
| 35 | if mode&os.ModeSetuid != 0 { |
| 36 | unixmode |= 0o4000 |
| 37 | } |
| 38 | |
| 39 | if mode&os.ModeSetgid != 0 { |
| 40 | unixmode |= 0o2000 |
| 41 | } |
| 42 | |
| 43 | if mode&os.ModeSticky != 0 { |
| 44 | unixmode |= 0o1000 |
| 45 | } |
| 46 | |
| 47 | return unixmode |
| 48 | } |
| 49 | |
| 50 | func populateAttributes(a *fuse.Attr, e fs.Entry) { |
| 51 | a.Mode = goModeToUnixMode(e.Mode()) |
no outgoing calls
no test coverage detected