Documentation ¶
Overview ¶
Package files provides a set type to track local/remote files with newness checks. We must do a certain amount of normalization in here. We will get fed paths with either native or wire-format separators and encodings depending on who calls us. We transform paths to wire-format (NFC and slashes) on the way to the database, and transform to native format (varying separator and encoding) on the way back out.
Index ¶
- func DropFolder(db *leveldb.DB, folder string)
- func ListFolders(db *leveldb.DB) []string
- type Set
- func (s *Set) Availability(file string) []protocol.DeviceID
- func (s *Set) Get(device protocol.DeviceID, file string) protocol.FileInfo
- func (s *Set) GetGlobal(file string) protocol.FileInfo
- func (s *Set) LocalVersion(device protocol.DeviceID) uint64
- func (s *Set) Replace(device protocol.DeviceID, fs []protocol.FileInfo)
- func (s *Set) ReplaceWithDelete(device protocol.DeviceID, fs []protocol.FileInfo)
- func (s *Set) Update(device protocol.DeviceID, fs []protocol.FileInfo)
- func (s *Set) WithGlobal(fn fileIterator)
- func (s *Set) WithGlobalTruncated(fn fileIterator)
- func (s *Set) WithHave(device protocol.DeviceID, fn fileIterator)
- func (s *Set) WithHaveTruncated(device protocol.DeviceID, fn fileIterator)
- func (s *Set) WithNeed(device protocol.DeviceID, fn fileIterator)
- func (s *Set) WithNeedTruncated(device protocol.DeviceID, fn fileIterator)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DropFolder ¶ added in v0.10.0
DropFolder clears out all information related to the given folder from the database.
func ListFolders ¶ added in v0.10.0
ListFolders returns the folder IDs seen in the database.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) ReplaceWithDelete ¶
func (*Set) WithGlobal ¶
func (s *Set) WithGlobal(fn fileIterator)
func (*Set) WithGlobalTruncated ¶
func (s *Set) WithGlobalTruncated(fn fileIterator)
func (*Set) WithHaveTruncated ¶
func (*Set) WithNeedTruncated ¶
Click to show internal directories.
Click to hide internal directories.