Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
saved_files.cpp File Reference

Implements saved file loading and cleanup helpers. More...

#include "src/startup/saved_files.h"
#include <algorithm>
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <windows.h>
#include "src/app/settings_storage.h"
#include "src/logging/log_file.h"
#include "src/platform/error_utils.h"
#include "src/platform/filesystem_utils.h"
#include "src/startup/client_identity_storage.h"
#include "src/startup/cover_art_cache.h"
#include "src/startup/host_storage.h"
Include dependency graph for saved_files.cpp:

Functions

bool startup::delete_all_saved_files (std::string *errorMessage=nullptr, const SavedFileCatalogConfig &config={})
 Delete every Moonlight-managed saved file currently present on disk.
 
bool startup::delete_saved_file (const std::string &path, std::string *errorMessage=nullptr, const SavedFileCatalogConfig &config={})
 Delete one Moonlight-managed file.
 
ListSavedFilesResult startup::list_saved_files (const SavedFileCatalogConfig &config={})
 Enumerate Moonlight-managed files that currently exist on disk.
 

Detailed Description

Implements saved file loading and cleanup helpers.

Function Documentation

◆ delete_all_saved_files()

bool startup::delete_all_saved_files ( std::string * errorMessage = nullptr,
const SavedFileCatalogConfig & config = {} )

Delete every Moonlight-managed saved file currently present on disk.

Parameters
errorMessageOptional output for factory-reset failures.
configOptional path overrides for tests or custom storage roots.
Returns
true when all managed files were removed successfully.

◆ delete_saved_file()

bool startup::delete_saved_file ( const std::string & path,
std::string * errorMessage = nullptr,
const SavedFileCatalogConfig & config = {} )

Delete one Moonlight-managed file.

Parameters
pathAbsolute or relative path returned by list_saved_files().
errorMessageOptional output for deletion failures.
configOptional path overrides for tests or custom storage roots.
Returns
true when the file was deleted or was already absent.

◆ list_saved_files()

ListSavedFilesResult startup::list_saved_files ( const SavedFileCatalogConfig & config = {})

Enumerate Moonlight-managed files that currently exist on disk.

Parameters
configOptional path overrides for tests or custom storage roots.
Returns
Existing files plus any non-fatal enumeration warnings.