Class NiteDirectories
- Namespace
- Nite.Configuration
- Assembly
- Nite.dll
Where Nite keeps per-user files, following the XDG Base Directory specification:
- Config: settings people edit (
config.json). - Cache: anything re-downloadable (tarballs, esbuild, registry metadata); safe to delete.
- Data and State: reserved for things that are neither.
Each can be overridden with NITE_CONFIG_DIR, NITE_CACHE_DIR, NITE_DATA_DIR or
NITE_STATE_DIR; otherwise XDG_*_HOME applies on every OS when set (to an absolute
path, as the spec requires). Defaults are the XDG ones on Linux and macOS (developers expect
~/.config from a CLI), and the native AppData folders on Windows.
public sealed record NiteDirectories : IEquatable<NiteDirectories>
- Inheritance
-
NiteDirectories
- Implements
- Inherited Members
Constructors
NiteDirectories(string, string, string, string)
Where Nite keeps per-user files, following the XDG Base Directory specification:
- Config: settings people edit (
config.json). - Cache: anything re-downloadable (tarballs, esbuild, registry metadata); safe to delete.
- Data and State: reserved for things that are neither.
Each can be overridden with NITE_CONFIG_DIR, NITE_CACHE_DIR, NITE_DATA_DIR or
NITE_STATE_DIR; otherwise XDG_*_HOME applies on every OS when set (to an absolute
path, as the spec requires). Defaults are the XDG ones on Linux and macOS (developers expect
~/.config from a CLI), and the native AppData folders on Windows.
public NiteDirectories(string Config, string Cache, string Data, string State)
Parameters
Properties
Cache
public string Cache { get; init; }
Property Value
Config
public string Config { get; init; }
Property Value
ConfigFile
The user configuration file.
public string ConfigFile { get; }
Property Value
Current
public static NiteDirectories Current { get; }
Property Value
Data
public string Data { get; init; }
Property Value
State
public string State { get; init; }
Property Value
Methods
LegacyCacheFolders()
Where Nite 0.1 and 0.2 kept their cache (.NET's LocalApplicationData), so nite cache clean
can remove it. On Linux that is ~/.local/share/nite, which is now the data directory, so
only the old cache's own subfolders count.
public static IEnumerable<string> LegacyCacheFolders()