Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  data-paths.ts

  Sprache: JAVA
 

/**
 * Centralised filename helpers for persisted QQBot state.
 *
 * Every persistence module routes file paths through these helpers so the
 * naming convention stays in sync and legacy migrations are handled
 * consistently.
 *
 * Key design decisions:
 * - Credential backup is keyed only by `accountId` because recovery runs
 *   exactly when the appId is missing from config.
 */


import path from "node:path";
import { getQQBotDataPath } from "./platform.js";

/**
 * Normalise an identifier so it is safe to embed in a filename.
 * Keeps alphanumerics, dot, underscore, dash; everything else becomes `_`.
 */

export function safeName(id: string): string {
  return id.replace(/[^a-zA-Z0-9._-]/g, "_");
}

// ---- credential backup ----

/**
 * Per-accountId credential backup file. Not keyed by appId because the
 * whole point of this file is to recover credentials when appId is
 * missing from the live config.
 */

export function getCredentialBackupFile(accountId: string): string {
  return path.join(getQQBotDataPath("data"), `credential-backup-${safeName(accountId)}.json`);
}

/** Legacy single-file credential backup (pre-multi-account-isolation). */
export function getLegacyCredentialBackupFile(): string {
  return path.join(getQQBotDataPath("data"), "credential-backup.json");
}

Messung V0.5 in Prozent
C=95 H=88 G=91

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik