feat(fs, config): add support for custom filesystem type construction (#9887)
For Synctrain I would like to create a virtual filesystem that exposes iOS' photo library. This can only be accessed through APIs.
This commit is contained in:
@@ -26,6 +26,14 @@ import (
|
||||
"github.com/syncthing/syncthing/lib/protocol"
|
||||
)
|
||||
|
||||
const FilesystemTypeFake FilesystemType = "fake"
|
||||
|
||||
func init() {
|
||||
RegisterFilesystemType(FilesystemTypeFake, func(root string, opts ...Option) (Filesystem, error) {
|
||||
return newFakeFilesystem(root, opts...), nil
|
||||
})
|
||||
}
|
||||
|
||||
// see readShortAt()
|
||||
const randomBlockShift = 14 // 128k
|
||||
|
||||
|
||||
Reference in New Issue
Block a user