2026-11-01 18:35:23 +01:00
|
|
|
// SPDX-License-Identifier: LGPL-3.0-only
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
2026-10-31 20:50:57 +01:00
|
|
|
|
|
|
|
|
export module Nostro:File;
|
|
|
|
|
|
|
|
|
|
import std;
|
|
|
|
|
|
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
|
|
|
|
|
|
export namespace Nostro {
|
|
|
|
|
fs::path GetConfigPath();
|
|
|
|
|
fs::path GetCachePath();
|
|
|
|
|
fs::path configPath = GetConfigPath();
|
|
|
|
|
fs::path cachePath = GetCachePath();
|
|
|
|
|
void CreatePrivateFile(const fs::path& path);
|
2026-11-01 18:35:23 +01:00
|
|
|
// A line from stdin, trimmed. On a terminal the prompt goes to stderr and what is typed is not echoed, so a key
|
|
|
|
|
// never sits in the shell's history or in the process's command line. Throws when stdin ends first.
|
|
|
|
|
std::string ReadSecret(std::string_view prompt);
|
2026-10-31 20:50:57 +01:00
|
|
|
}
|