1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Which drives this machine has, so `install` can say what it is *not*
//! covering.
//!
//! Reporting only. Nothing here is ever swept, watched or added as a scope —
//! that would be exactly the guess this module exists to avoid making. The
//! problem being solved is narrower and entirely a Windows one: the first-run
//! default scope is the home directory, the home directory is on `C:`, and a
//! great many developers keep their repositories on `D:` or `E:`. Those people
//! would otherwise write an `agent.lock`, see nothing happen, and have no reason
//! to suspect the scope model exists.
//!
//! So `install` enumerates the fixed drives, subtracts the ones already covered,
//! and prints the exact `ralon scope add` for the rest. Detected and named, never
//! assumed — the developer still decides.
//!
//! Unix has no equivalent question. There is one tree, and a home directory is
//! inside it.
use PathBuf;
/// Drive roots holding local storage: `C:\`, `D:\`.
///
/// Removable and network drives are left out on purpose. A scope on a USB stick
/// or a mapped share is a scope that disappears, and suggesting one would be
/// suggesting a supervisor that reports a directory it cannot reach.