AnkiIO 1.0.2
Build, validate, import, and export Anki-compatible decks from .NET
Loading...
Searching...
No Matches
AnkiIO.AnkiInstallation(string ExecutablePath, string InstallationDirectory, Version Version, string VersionText, string? DataDirectory, bool ProfilesPresent, bool CollectionsPresent, bool MediaDirectoriesPresent, bool AddonsDirectoryPresent) Class Referencesealed

Provides an immutable snapshot of an Anki application discovered on the local computer. More...

Properties

string ExecutablePath = ExecutablePath [get]
 Gets the discovered Anki executable path.
string InstallationDirectory = InstallationDirectory [get]
 Gets the directory containing the discovered Anki executable.
Version Version = Version [get]
 Gets the parsed Anki application version.
string VersionText = VersionText [get]
 Gets the normalized version text observed during detection.
string? DataDirectory = DataDirectory [get]
 Gets the conventional or explicitly overridden Anki data directory.
bool ProfilesPresent = ProfilesPresent [get]
 Gets whether the data directory contained at least one immediate child directory when detected.
bool CollectionsPresent = CollectionsPresent [get]
 Gets whether an immediate profile directory contained a recognized collection filename.
bool MediaDirectoriesPresent = MediaDirectoriesPresent [get]
 Gets whether an immediate profile directory contained a collection.media directory.
bool AddonsDirectoryPresent = AddonsDirectoryPresent [get]
 Gets whether an addons21 directory existed directly below the data directory.

Detailed Description

Provides an immutable snapshot of an Anki application discovered on the local computer.

Parameters
ExecutablePathThe absolute path to the discovered Anki executable.
InstallationDirectoryThe absolute directory that contains ExecutablePath .
VersionThe parsed application version, or 0.0 when available text could not be parsed.
VersionTextThe normalized version text obtained from an override or installation metadata.
DataDirectoryThe conventional or overridden Anki data directory; it need not exist.
ProfilesPresentWhether the data directory had at least one immediate child directory.
CollectionsPresentWhether an immediate profile directory had a recognized collection filename.
MediaDirectoriesPresentWhether an immediate profile directory had a collection.media directory.
AddonsDirectoryPresentWhether an addons21 directory existed below the data directory.

This is discovery metadata, not a live installation handle. Presence flags are point-in-time hints and do not prove that a profile is readable, that its schema is supported, or that modifying it would be safe. The detector does not retain file or registry handles after constructing the snapshot.

Use AnkiCompatibilityRegistry.Resolve with Version when explicit format capability metadata is needed. A successful detection and a successful adapter resolution are deliberately separate decisions.

Definition at line 24 of file AnkiInstallation.cs.

Property Documentation

◆ AddonsDirectoryPresent

bool AnkiIO.AnkiInstallation.AddonsDirectoryPresent = AddonsDirectoryPresent
get

Gets whether an addons21 directory existed directly below the data directory.

A directory-presence hint; add-on contents are not inspected or executed.

Definition at line 69 of file AnkiInstallation.cs.

◆ CollectionsPresent

bool AnkiIO.AnkiInstallation.CollectionsPresent = CollectionsPresent
get

Gets whether an immediate profile directory contained a recognized collection filename.

A filename-presence hint for collection.anki2 or collection.anki21; the database is not opened.

Definition at line 61 of file AnkiInstallation.cs.

◆ DataDirectory

string? AnkiIO.AnkiInstallation.DataDirectory = DataDirectory
get

Gets the conventional or explicitly overridden Anki data directory.

The absolute candidate path, or null when no candidate path is available.

Definition at line 53 of file AnkiInstallation.cs.

◆ ExecutablePath

string AnkiIO.AnkiInstallation.ExecutablePath = ExecutablePath
get

Gets the discovered Anki executable path.

The absolute path observed during detection; the file may subsequently move or disappear.

Definition at line 37 of file AnkiInstallation.cs.

◆ InstallationDirectory

string AnkiIO.AnkiInstallation.InstallationDirectory = InstallationDirectory
get

Gets the directory containing the discovered Anki executable.

The absolute installation directory observed during detection.

Definition at line 41 of file AnkiInstallation.cs.

◆ MediaDirectoriesPresent

bool AnkiIO.AnkiInstallation.MediaDirectoriesPresent = MediaDirectoriesPresent
get

Gets whether an immediate profile directory contained a collection.media directory.

A directory-presence hint; media names and payloads are not enumerated or read.

Definition at line 65 of file AnkiInstallation.cs.

◆ ProfilesPresent

bool AnkiIO.AnkiInstallation.ProfilesPresent = ProfilesPresent
get

Gets whether the data directory contained at least one immediate child directory when detected.

A presence hint; arbitrary child directories may satisfy it and contents are not recursively inspected.

Definition at line 57 of file AnkiInstallation.cs.

◆ Version

Version AnkiIO.AnkiInstallation.Version = Version
get

Gets the parsed Anki application version.

The parsed version, or 0.0 when detection could not parse the available version text.

Definition at line 45 of file AnkiInstallation.cs.

◆ VersionText

string AnkiIO.AnkiInstallation.VersionText = VersionText
get

Gets the normalized version text observed during detection.

The first token before a space or build-metadata +, or 0.0 when none was available.

Definition at line 49 of file AnkiInstallation.cs.


The documentation for this class was generated from the following file: