Deprecate scanner.Block & File

This commit is contained in:
Jakob Borg
2014-07-12 23:06:48 +02:00
parent 91b35118d9
commit 655acb4cb2
21 changed files with 269 additions and 480 deletions

View File

@@ -2,13 +2,12 @@ package files
import (
"sort"
"github.com/calmh/syncthing/scanner"
"github.com/calmh/syncthing/protocol"
)
type SortBy func(p scanner.File) int
type SortBy func(p protocol.FileInfo) int
func (by SortBy) Sort(files []scanner.File) {
func (by SortBy) Sort(files []protocol.FileInfo) {
ps := &fileSorter{
files: files,
by: by,
@@ -17,8 +16,8 @@ func (by SortBy) Sort(files []scanner.File) {
}
type fileSorter struct {
files []scanner.File
by func(p1 scanner.File) int
files []protocol.FileInfo
by func(p1 protocol.FileInfo) int
}
func (s *fileSorter) Len() int {