[libcxx] [test] Fix fs.op.last_write_time for Windows
authorMartin Storsjö <martin@martin.st>
Sun, 2 May 2021 21:13:51 +0000 (00:13 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 12 May 2021 19:23:01 +0000 (22:23 +0300)
commit6bd3d8a17cef9108a338ada9b3dbed201bf9c158
tree3fc2bd1e2be911f998f3dc2805caee36f0d6e015
parent77997f28d5954fa2417806586f2c5c9d1a0ffeef
[libcxx] [test] Fix fs.op.last_write_time for Windows

Don't use stat and lstat on Windows; lstat is missing, stat only provides
the modification times with second granularity (and does the wrong thing
regarding symlinks). Instead do a minimal reimplementation using the
native windows APIs.

Differential Revision: https://reviews.llvm.org/D101731
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
libcxx/test/support/filesystem_test_helper.h