Skip to content

filesystem

anthony.samms edited this page May 28, 2026 · 1 revision

This library provides some useful functions related to filesystem access.

void set_working_directory_to_executable()

Sets the working directory of the program to the directory of the program. This is required to load the skin and assets.

void extract_osz(const fs::path& osz_path);

Extract an .osz file for osu. This will delete the .osz file after execution.

std::vector<fs::path> get_song_files(std::vector<fs::path> root_path);

Returns a list of song paths based on a root path. This will not parse the songs.

rapidjson::Document read_json_file(fs::path file_path);

Parses a json file into a rapidjson Document.

std::vector<SongListEntry> read_song_list(const fs::path& path);

Reads a song_list.txt file. A song_list.txt file is structured as:

hash|title|subtitle

Where:

  • hash is the concatenated hash of each difficulty in the chart
  • title is the English (en) title of the chart
  • subtitle is the English (en) subtitle of the chart
void write_song_list(const fs::path& path, const std::vector<SongListEntry>& entries);

Write a song_list.txt file to a specified path.

Clone this wiki locally