native: Improve windows file handling
This commit splits the file implementation into file_unix and file_win32. The two implementations have diverged to the point that they share almost 0 code at this point, so it's easier to maintain as separate files. The other major change accompanied with this commit is that file::open is no longer based on libc's open function on windows, but rather windows's CreateFile function. This fixes dealing with binary files on windows (test added in previous commit). This also changes the read/write functions to use ReadFile and WriteFile instead of libc's read/write. Closes #12406
Showing
src/libnative/io/file_win32.rs
0 → 100644
想要评论请 注册 或 登录