MCPcopy Create free account
hub / github.com/celer-pkg/celer / validateDir

Method validateDir

pkgcache/cache_setup.go:218–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216}
217
218func (n *NFSServerSetup) validateDir() error {
219 info, err := os.Stat(n.nfsDir)
220 if err != nil {
221 return fmt.Errorf("cannot access %s -> %w", n.nfsDir, err)
222 }
223 if !info.IsDir() {
224 return fmt.Errorf("%s is not a directory", n.nfsDir)
225 }
226 return nil
227}
228
229func (n *NFSServerSetup) removeAppendOnlyAttribute() error {
230 args := []string{n.nfsDir, "-type", "d", "-exec", "chattr", "-a", "{}", ";"}

Callers 1

SetupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected