stream: add file::exists and file::readonly

We are targeting C++14, while C++17 already has std::filesystem::exists. 😢

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman
2023-09-20 13:00:15 +02:00
parent dcfc4752b5
commit 6689aa5210
3 changed files with 64 additions and 1 deletions

View File

@@ -139,6 +139,13 @@ namespace UnitTests
std::filesystem::remove(filename[i]);
}
TEST_METHOD(file_stat)
{
sstring path(temp_path());
Assert::IsTrue(stdex::stream::file::exists(path));
Assert::IsFalse(stdex::stream::file::readonly(path));
}
protected:
static sstring temp_path()
{