FindMyFiles
FindMyFiles.Services
AppPaths Class
Resolves where the app keeps its state — <b>portable by default</b> (ADR-0024). On first access it picks one data root, once, in this order:
--data-dir=<path>when given (tests, scratch, power users);<exe>\datawhen it can be created and written — the default, so a copied/unzipped build keeps everything in its own folder and touches neither the user profile nor the registry ("just drop it / just delete it");- the per-user profile (
%APPDATA%/%LOCALAPPDATA%) only when the app folder is read-only (e.g. installed under Program Files).
The machine-scope service index (%ProgramData%) and the admin in-proc
index are intentionally <i>not</i> redirected — that path is an install by
nature, the opposite of portable.
Resolution is silent: it must not call FileLog, because FileLog's directory comes from here (a cycle otherwise).
public static class AppPaths
Inheritance System.Object → AppPaths
Properties
AppPaths.IsPortable Property
True when state lives next to the exe (or --data-dir),
not in the user profile.
public static bool IsPortable { get; }
Property Value
AppPaths.LogDir Property
App + scope-engine log directory — portable <data>\logs,
else %APPDATA%\find-my-files\logs.
public static string LogDir { get; }
Property Value
AppPaths.PortableRoot Property
The portable data root, or null when falling back to the per-user profile. Surfaced for the setup screen / diagnostics ("running portable from …").
public static string? PortableRoot { get; }
Property Value
AppPaths.ScopeIndexDir Property
Scope-mode (ADR-0024) index directory — portable
<data>\index, else %LOCALAPPDATA%\find-my-files\index.
public static string ScopeIndexDir { get; }
Property Value
AppPaths.SettingsFile Property
User-scope settings file — portable <data>\settings.json,
else %APPDATA%\find-my-files\settings.json.
public static string SettingsFile { get; }