On Windows, std.file.remove calls DeleteFileW, which can only delete regular files. On POSIX, it calls remove(3), which can remove both files and (empty) directories.
Depending on how we *want* it to work, it should conditionally call DeleteFileW or RemoveDirectoryW on Windows, or it should call unlink(2) on POSIX. The former solution is far less of a breaking change, but the breakage is more subtle and silent.
Comment #1 by robert.schadek — 2024-12-01T16:41:22Z