open returns a file handle to /dev/loop# and returns an error if it cannot be opened.
()
| 35 | // open returns a file handle to /dev/loop# and returns an error if it cannot |
| 36 | // be opened. |
| 37 | func (device Device) open() (*os.File, error) { |
| 38 | return os.OpenFile(device.Path(), device.flags, 0660) |
| 39 | } |
| 40 | |
| 41 | // Path returns the path to the loopback device |
| 42 | func (device Device) Path() string { |