MCPcopy Create free account
hub / github.com/clementgallet/libTAS / remove_savestates

Function remove_savestates

src/program/utils.cpp:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include <filesystem>
31
32void remove_savestates(Context* context)
33{
34 std::filesystem::path savestateprefix = context->config.savestatedir / context->gamename;
35 for (int i=0; i<=10; i++) {
36 std::filesystem::path savestatepmpath = savestateprefix;
37 savestatepmpath += ".state" + std::to_string(i) + ".pm";
38 std::filesystem::remove(savestatepmpath);
39 std::filesystem::path savestatepspath = savestateprefix;
40 savestatepspath += ".state" + std::to_string(i) + ".p";
41 std::filesystem::remove(savestatepspath);
42 }
43}
44
45int extractBinaryType(std::filesystem::path path)
46{

Callers 2

initMethod · 0.85
loopExitMethod · 0.85

Calls 1

removeFunction · 0.85

Tested by

no test coverage detected