Package-level declarations
File backend scanner.
File Synchronizer
The synchronizer is used to scan all files in the specified user's storage. Its methods are available from the FileSynchronizer interface.
val fileManager: FileManager
val synchronizer: FileSynchronizer = fileManager.synchronizer
lifecycleScope.launch {
synchronizer.state.collect { state -> // state: FileSynchronizer.State
// Handle it...
}
}
lifecycleScope.launch {
// Calling without parameters scans the main file cloud
synchronizer.synchronize()
// Calling from a shared link Id scans all files in the shared link
val shareId = "shareId"
synchronizer.synchronize(shareId)
}Content copied to clipboard
It is assumed that the scan will be triggered once before enabling websockets, and all changes to the database will be made through processing websocket events.
Types
Link copied to clipboard
interface FileSynchronizer