MCPcopy
hub / github.com/syncthing/syncthing / AllLocalFiles

Method AllLocalFiles

internal/db/sqlite/db_folderdb.go:192–201  ·  view source on GitHub ↗
(folder string, device protocol.DeviceID)

Source from the content-addressed store, hash-verified

190}
191
192func (s *DB) AllLocalFiles(folder string, device protocol.DeviceID) (iter.Seq[protocol.FileInfo], func() error) {
193 fdb, err := s.getFolderDB(folder, false)
194 if errors.Is(err, errNoSuchFolder) {
195 return func(yield func(protocol.FileInfo) bool) {}, func() error { return nil }
196 }
197 if err != nil {
198 return func(yield func(protocol.FileInfo) bool) {}, func() error { return err }
199 }
200 return fdb.AllLocalFiles(device)
201}
202
203func (s *DB) AllLocalFilesBySequence(folder string, device protocol.DeviceID, startSeq int64, limit int) (iter.Seq[protocol.FileInfo], func() error) {
204 fdb, err := s.getFolderDB(folder, false)

Callers

nothing calls this directly

Implementers 1

DBinternal/db/sqlite/db_open.go

Calls 3

getFolderDBMethod · 0.95
AllLocalFilesMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected