MCPcopy Create free account
hub / github.com/Debian/dcs / countNL

Function countNL

internal/sourcebackend/sourcebackend.go:185–196  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

183 return s.UnpackedPath.ReadFile(path)
184}
185
186func (s *Server) ReplaceIndex(newShard string) error {
187 file, err := os.Open(filepath.Dir(s.IndexPath))
188 if err != nil {
189 return err
190 }
191 defer file.Close()
192 names, err := file.Readdirnames(-1)
193 if err != nil {
194 return err
195 }
196
197 for _, name := range names {
198 if name == newShard {
199 newShard = filepath.Join(filepath.Dir(s.IndexPath), name)

Callers 1

SearchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected