MCPcopy
hub / github.com/syncthing/syncthing / handle

Method handle

lib/model/folder_recvonly.go:194–210  ·  view source on GitHub ↗
(fi protocol.FileInfo)

Source from the content-addressed store, hash-verified

192}
193
194func (q *deleteQueue) handle(fi protocol.FileInfo) (bool, error) {
195 // Things that are ignored but not marked deletable are not processed.
196 ign := q.ignores.Match(fi.Name)
197 if ign.IsIgnored() && !ign.IsDeletable() {
198 return false, nil
199 }
200
201 // Directories are queued for later processing.
202 if fi.IsDirectory() {
203 q.dirs = append(q.dirs, fi.Name)
204 return false, nil
205 }
206
207 // Kill it.
208 err := q.handler.deleteItemOnDisk(fi, q.scanChan)
209 return true, err
210}
211
212func (q *deleteQueue) flush() ([]string, error) {
213 // Process directories from the leaves inward.

Callers 1

revertMethod · 0.95

Calls 5

IsDeletableMethod · 0.80
deleteItemOnDiskMethod · 0.80
MatchMethod · 0.65
IsIgnoredMethod · 0.45
IsDirectoryMethod · 0.45

Tested by

no test coverage detected