MCPcopy
hub / github.com/syncthing/syncthing / GetDeviceFile

Method GetDeviceFile

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

Source from the content-addressed store, hash-verified

124}
125
126func (s *DB) GetDeviceFile(folder string, device protocol.DeviceID, file string) (protocol.FileInfo, bool, error) {
127 fdb, err := s.getFolderDB(folder, false)
128 if errors.Is(err, errNoSuchFolder) {
129 return protocol.FileInfo{}, false, nil
130 }
131 if err != nil {
132 return protocol.FileInfo{}, false, err
133 }
134 return fdb.GetDeviceFile(device, file)
135}
136
137func (s *DB) GetGlobalAvailability(folder, file string) ([]protocol.DeviceID, error) {
138 fdb, err := s.getFolderDB(folder, false)

Callers

nothing calls this directly

Implementers 1

DBinternal/db/sqlite/db_open.go

Calls 3

getFolderDBMethod · 0.95
GetDeviceFileMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected