Skip to main content

detect_sync_root

Function detect_sync_root 

Source
pub fn detect_sync_root(env: &Env, fs: &dyn Fs, path: &Path) -> Option<SyncRoot>
Expand description

Finds a file-sync folder containing path.

Walks the ancestors of path (stopping at Fs::root) for a Resilio .sync folder holding ID or IgnoreList, or a Syncthing .stfolder. Then compares against provider roots: OneDrive (OneDrive, OneDriveConsumer, OneDriveCommercial variables), Dropbox (info.json), Google Drive (~/My Drive, ~/Google Drive, a <drive>:\My Drive stream mount) and macOS ~/Library/CloudStorage.