MCPcopy
hub / github.com/perkeep/perkeep / Directory

Method Directory

pkg/schema/schema.go:180–192  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

178}
179
180func (de *dirEntry) Directory(ctx context.Context) (Directory, error) {
181 if de.dr == nil {
182 if de.ss.Type != TypeDirectory {
183 return nil, fmt.Errorf("DirectoryEntry is camliType %q, not %q", de.ss.Type, TypeDirectory)
184 }
185 dr, err := NewDirReader(ctx, de.fetcher, de.ss.BlobRef)
186 if err != nil {
187 return nil, err
188 }
189 de.dr = dr
190 }
191 return de.dr, nil
192}
193
194func (de *dirEntry) Symlink() (Symlink, error) {
195 return 0, errors.New("TODO: Symlink not implemented")

Callers

nothing calls this directly

Calls 1

NewDirReaderFunction · 0.85

Tested by

no test coverage detected