Conversation
Add platform-specific access time retrieval via the new actime package (darwin, linux, windows) and use it to check if a file was modified since it was last read (mtime > atime).
Add test cases for the -N operator covering modified-after-read, non-existent file, and read-after-modification scenarios.
|
We can't just support the three main GOOSes; e.g. CI also covers js and plan9 because some users care about less widespread platforms. At least there should be a fallback file for other platforms that acts as a no-op by returning the mod time. We need the type assertions to use the Finally, name these files consistently with |
…x, Other, and Windows, and added safe type assertions and fallback for other platforms
|
Thanks for the review. I added Changes Made
|
|
you're exposing public APIs. make these internal APIs in the interp package |
… and remove old files
|
I internalized the actime logic, so it's only accessible via the interp package. |
|
I meant in the actual interp package. I'll tweak this myself and merge it later. |
|
Sorry for the confusion, I misunderstood the req, It's fixed now. |
|
The test fails on Windows. Not sure if the test is too flakey with the sleep, or if it's just incorrect on Windows. I'll have to investigate. |
Summary
Implemented #1316