mounter is an interface to system-level calls used by TempRemount.
| 160 | |
| 161 | // mounter is an interface to system-level calls used by TempRemount. |
| 162 | type mounter interface { |
| 163 | // GetMounts wraps procfs.GetMounts |
| 164 | GetMounts() ([]*procfs.MountInfo, error) |
| 165 | // Stat wraps os.Stat |
| 166 | Stat(string) (os.FileInfo, error) |
| 167 | // MkdirAll wraps os.MkdirAll |
| 168 | MkdirAll(string, os.FileMode) error |
| 169 | // OpenFile wraps os.OpenFile |
| 170 | OpenFile(string, int, os.FileMode) (*os.File, error) |
| 171 | // Mount wraps syscall.Mount |
| 172 | Mount(string, string, string, uintptr, string) error |
| 173 | // Unmount wraps syscall.Unmount |
| 174 | Unmount(string, int) error |
| 175 | // ReadDir wraps os.ReadDir |
| 176 | ReadDir(string) ([]os.DirEntry, error) |
| 177 | // EvalSymlinks wraps filepath.EvalSymlinks |
| 178 | EvalSymlinks(string) (string, error) |
| 179 | // Rename wraps os.Rename |
| 180 | Rename(string, string) error |
| 181 | } |
| 182 | |
| 183 | // realMounter implements mounter and actually does the thing. |
| 184 | type realMounter struct{} |
no outgoing calls
no test coverage detected