The win32 Filesystem impl code uses POSIX substem functions and should be refactored to use win32 APIs instead. The File IoError class should also be converted to use the platform agnostic Envoy::errorDetails function instead of strerror as we will no longer be using POSIX on Windows.
We believe coalescing on all win32 APIs will make error handling and reasoning about these operations easier and more consistent with the rest of the codebase. In #11565 we introduce a standardized mechanism for handling errors from winsock2 which are disjoint from POSIX errors. If we can eliminate as many uses of the POSIX subsystem we can, it should make for an easier time writing portable code. We only need a translation from win32 to generic Envoy errors on Windows and POSIX to generic Envoy errors on other platforms, the alternative being that Windows requires conversion of win32 errors to POSIX which is not possible in all cases and can be misleading when debugging.