Replace all use of POSIX unlink

Use `<filesystem>` instead of `unlink` and remove `unlink` portability
wrapper.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2026-06-14 19:44:09 +02:00
parent 4259c78150
commit 518ed74496
8 changed files with 50 additions and 37 deletions
-2
View File
@@ -67,8 +67,6 @@ extern int wclose(int fd);
// this function called.
int wtruncate(const OsPath& pathname, off_t length);
int wunlink(const OsPath& pathname);
int wrmdir(const OsPath& path);
@@ -93,17 +93,11 @@ int wclose(int fd)
return close(fd);
}
int wtruncate(const OsPath& pathname, off_t length)
{
return truncate(OsString(pathname).c_str(), length);
}
int wunlink(const OsPath& pathname)
{
return unlink(OsString(pathname).c_str());
}
int wrmdir(const OsPath& path)
{
return rmdir(OsString(path).c_str());
@@ -146,12 +146,6 @@ int wtruncate(const OsPath& pathname, off_t length)
}
int wunlink(const OsPath& pathname)
{
return _wunlink(OsString(pathname).c_str());
}
int wrmdir(const OsPath& path)
{
return _wrmdir(OsString(path).c_str());