Skip to content

Commit 5a29b6b

Browse files
committed
docs(explanation): complete and color the directory-choice flowchart
Add the missing user-facing/media dirs branch (documents, downloads, pictures, videos, music, fonts, templates, projects, desktop, publicshare) and the macOS preference dir node. Color coding: blue = app dirs, green = user media dirs, purple = macOS-only preference, amber = decision nodes.
1 parent 5a8c384 commit 5a29b6b

1 file changed

Lines changed: 52 additions & 11 deletions

File tree

docs/explanation.rst

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,58 @@ lifetime.
2323
.. mermaid::
2424

2525
flowchart TD
26-
A[What kind of data?] --> B{Can it be deleted<br/>without data loss?}
27-
B -- Yes --> C{Is it used to<br/>speed things up?}
28-
C -- Yes --> D[**cache** dir]
29-
C -- No --> E{Is it temporary<br/>for this session?}
30-
E -- Yes --> F[**runtime** dir]
31-
E -- No --> G[**state** dir]
32-
B -- No --> H{Is it a<br/>user preference?}
33-
H -- Yes --> I[**config** dir]
34-
H -- No --> J{Is it a<br/>log file?}
35-
J -- Yes --> K[**log** dir]
36-
J -- No --> L[**data** dir]
26+
A([What kind of data?]) --> B{Belongs to the app<br/>or to the user?}
27+
28+
B -- App internal --> C{Can it be deleted<br/>without data loss?}
29+
C -- Yes --> D{Speeds things up?}
30+
D -- Yes --> CACHE[cache dir]
31+
D -- No --> E{Temporary for<br/>this session only?}
32+
E -- Yes --> RUNTIME[runtime dir]
33+
E -- No --> STATE[state dir]
34+
C -- No --> F{What kind?}
35+
F -- Settings / options --> CONFIG[config dir]
36+
F -- macOS preferences --> PREF[preference dir]
37+
F -- Log file --> LOG[log dir]
38+
F -- Everything else --> DATA[data dir]
39+
40+
B -- User-facing file --> G{File type?}
41+
G -- Document / report --> DOC[documents dir]
42+
G -- Downloaded content --> DL[downloads dir]
43+
G -- Image --> PIC[pictures dir]
44+
G -- Video --> VID[videos dir]
45+
G -- Audio --> MUS[music dir]
46+
G -- Font --> FONT[fonts dir]
47+
G -- Template --> TMPL[templates dir]
48+
G -- Project / code --> PROJ[projects dir]
49+
G -- Desktop shortcut --> DESK[desktop dir]
50+
G -- Share with others --> PUB[publicshare dir]
51+
52+
style A fill:#1e40af,stroke:#1e3a8a,color:#fff
53+
style B fill:#d97706,stroke:#b45309,color:#fff
54+
style C fill:#d97706,stroke:#b45309,color:#fff
55+
style D fill:#d97706,stroke:#b45309,color:#fff
56+
style E fill:#d97706,stroke:#b45309,color:#fff
57+
style F fill:#d97706,stroke:#b45309,color:#fff
58+
style G fill:#d97706,stroke:#b45309,color:#fff
59+
60+
style CACHE fill:#2563eb,stroke:#1d4ed8,color:#fff
61+
style RUNTIME fill:#2563eb,stroke:#1d4ed8,color:#fff
62+
style STATE fill:#2563eb,stroke:#1d4ed8,color:#fff
63+
style CONFIG fill:#2563eb,stroke:#1d4ed8,color:#fff
64+
style PREF fill:#7c3aed,stroke:#6d28d9,color:#fff
65+
style LOG fill:#2563eb,stroke:#1d4ed8,color:#fff
66+
style DATA fill:#2563eb,stroke:#1d4ed8,color:#fff
67+
68+
style DOC fill:#16a34a,stroke:#15803d,color:#fff
69+
style DL fill:#16a34a,stroke:#15803d,color:#fff
70+
style PIC fill:#16a34a,stroke:#15803d,color:#fff
71+
style VID fill:#16a34a,stroke:#15803d,color:#fff
72+
style MUS fill:#16a34a,stroke:#15803d,color:#fff
73+
style FONT fill:#16a34a,stroke:#15803d,color:#fff
74+
style TMPL fill:#16a34a,stroke:#15803d,color:#fff
75+
style PROJ fill:#16a34a,stroke:#15803d,color:#fff
76+
style DESK fill:#16a34a,stroke:#15803d,color:#fff
77+
style PUB fill:#16a34a,stroke:#15803d,color:#fff
3778

3879
Data directories
3980
================

0 commit comments

Comments
 (0)