paths.rs

crates/veilvoice-gui/src/paths.rs

veilvoice-gui · 234 lines · read the source here · or on GitHub

Exactly where this copy of VeilVoice is keeping things.

Why the About tab prints these

Every one of these locations is derived on the machine it runs on, from the environment the platform provides, and every one of them is different on Windows, macOS and Linux. Somebody backing up a vault, moving a settings file, or wondering why a palette they wrote is not in the picker has one question, and until now the honest answer was "read the source".

A guess is worse than nothing here. A person told the wrong directory deletes the wrong directory.

Derived, not listed

Each entry calls the function the rest of the application calls, so this panel cannot say one thing while the program does another. The list is not a second description of where things live; it is the same one, read out.

A test reads the crate's own source for every default_path and default_dir and fails naming any this panel does not show, so a location added tomorrow cannot quietly stop being reported.

The one path deliberately not shown

The app lock's own files. veilvoice_crypto::vault gives them names derived from an index rather than a fixed name, which is obscurity and is described as obscurity there: what it buys is that a search of a disk for a known filename misses, and that a backup rule written against one does too. Printing the names in a window would hand both back to anybody standing behind the person reading it. The directory is shown, which is the part that answers "what do I back up".

In plain words

The About tab lists the folders VeilVoice is actually using on this computer, so you can find your settings, your vaults and your palettes without guessing.

WHAT THIS FILE CONTAINS

234 lines defining 5 functions (3 public), 1 type and 0 constants. Everything below is read out of the source, so it cannot disagree with the code.

The types it owns.

  • struct Where line 44 · One place VeilVoice keeps something, and what it keeps there.

What happens when it runs. These are the ways in: public, and nothing else in this file calls them, so they are what an outside caller reaches first.

  • arrangement line 62 · Which of the two arrangements this copy is using, in one sentence.
  • all line 85 · Every location, in the order the About tab shows them.
  • carry_over line 151 · Copy a portable copy's state into the platform's own configuration directory, without overwriting anything already there.
    reaches copy_new_only, copy_into

WHAT CALLS WHAT

arrangement line 62 all line 85 carry_over line 151 copy_new_only line 176 copy_into line 219 entry: a way in: public, and nothing in this file calls it helper: private to this file dashed: a call that goes back up, or across a wrapped rank The functions this file defines, and the calls between them. An edge means the callee's name appears, called, inside the caller's body. This is a syntactic reading, not a type-resolved one.

The functions this file defines, and the calls between them. An edge means the callee's name appears, called, inside the caller's body. This is a syntactic reading, not a type-resolved one.

The same graph as Mermaid source
%%{init: {"theme":"base","themeVariables":{"background":"#1a1b26","primaryColor":"#1f2335","primaryTextColor":"#c0caf5","primaryBorderColor":"#7aa2f7","secondaryColor":"#16161e","tertiaryColor":"#16161e","lineColor":"#737aa2","textColor":"#c0caf5","mainBkg":"#1f2335","nodeBorder":"#7aa2f7","clusterBkg":"#16161e","clusterBorder":"#2f3549","fontFamily":"ui-monospace, SFMono-Regular, Consolas, monospace","fontSize":"14px"}}}%%
flowchart TD
    n_arrangement(["arrangement<br/>line 62"])
    n_all(["all<br/>line 85"])
    n_carry_over(["carry_over<br/>line 151"])
    n_copy_new_only["copy_new_only<br/>line 176"]
    n_copy_into["copy_into<br/>line 219"]
    n_carry_over --> n_copy_new_only
    n_copy_new_only --> n_copy_into
    click n_arrangement href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-gui/src/paths.rs#L62" "open the source"
    click n_all href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-gui/src/paths.rs#L85" "open the source"
    click n_carry_over href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-gui/src/paths.rs#L151" "open the source"
    click n_copy_new_only href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-gui/src/paths.rs#L176" "open the source"
    click n_copy_into href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-gui/src/paths.rs#L219" "open the source"
    classDef entry fill:#1f2335,stroke:#7aa2f7,color:#c0caf5
    class n_arrangement,n_all,n_carry_over entry
    classDef helper fill:#1f2335,stroke:#bb9af7,color:#c0caf5
    class n_copy_new_only,n_copy_into helper

This site loads no third-party script, so it cannot run Mermaid; the diagram above is the same nodes and edges drawn by the generator instead. GitHub renders the source below directly.

ITEMS

ItemLineDocumentation
Where pub struct44One place VeilVoice keeps something, and what it keeps there.
arrangement pub fn62Which of the two arrangements this copy is using, in one sentence.
all pub fn85Every location, in the order the About tab shows them.
carry_over pub fn151Copy a portable copy's state into the platform's own configuration directory, without overwriting anything already there.
copy_new_only fn176Everything in from that is not already in into, and a line about each.
copy_into fn219One file or one whole directory, recursively.