namespace AIStudio.Tools.DataBackup; /// /// A file or folder AI Studio keeps in its data or configuration folder. /// /// The folder in which the entry lies. /// The path of the entry within that folder, with forward slashes. A folder ends with a slash. /// What the entry holds, and with it, whether it belongs into a backup. public sealed record DataBackupEntry(DataBackupLocation Location, string RelativePath, DataBackupEntryKind Kind) { /// /// Whether the entry belongs into a backup. /// public bool IsIncluded => this.Kind is DataBackupEntryKind.SETTINGS or DataBackupEntryKind.WORKSPACES or DataBackupEntryKind.TEMPORARY_CHATS or DataBackupEntryKind.PLUGINS or DataBackupEntryKind.TOKENIZERS or DataBackupEntryKind.VISUAL_BRIEFINGS or DataBackupEntryKind.DATA_SOURCE_INDEX or DataBackupEntryKind.VECTOR_STORES; /// /// Whether the entry is a folder rather than a single file. /// public bool IsFolder => this.RelativePath.EndsWith(DataBackupContents.SEPARATOR); }