MCPcopy Create free account
hub / github.com/coder/envbuilder / mounter

Interface mounter

internal/ebutil/remount.go:162–181  ·  view source on GitHub ↗

mounter is an interface to system-level calls used by TempRemount.

Source from the content-addressed store, hash-verified

160
161// mounter is an interface to system-level calls used by TempRemount.
162type 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.
184type realMounter struct{}

Callers 44

Test_tempRemountFunction · 0.65
tempRemountFunction · 0.65
GetMountsMethod · 0.65
findDevcontainerJSONFunction · 0.65
fileExistsFunction · 0.65
ExtractFunction · 0.65
ShallowCloneRepoFunction · 0.65
TestShallowCloneRepoFunction · 0.65
libraryDirectoryPathFunction · 0.65
Test_tempRemountFunction · 0.65
remountFunction · 0.65
runFunction · 0.65

Implementers 3

Mockmounterinternal/ebutil/mock_mounter_test.go
MockmounterMockRecorderinternal/ebutil/mock_mounter_test.go
realMounterinternal/ebutil/remount.go

Calls

no outgoing calls

Tested by

no test coverage detected