Add multi-platform remove_file helper

And use it for deleting internal keys
This commit is contained in:
Andrew Ayer
2014-09-12 19:41:54 -07:00
parent 70879eaf57
commit 690dba2f14
4 changed files with 19 additions and 8 deletions

View File

@@ -285,6 +285,13 @@ void touch_file (const std::string& filename)
}
}
void remove_file (const std::string& filename)
{
if (unlink(filename.c_str()) == -1) {
throw System_error("unlink", filename, errno);
}
}
static void init_std_streams_platform ()
{
}