6

In Linux (probably also in Windows/OSX) if we open a file to write and while writing to it we rename it, the raku process goes smooth and keeps writing to the file as it should.

But how can we find the new name (path) of the file while the renaming happens?

IO::Notification is NOT the way to go because it gives no other information but only the general description:

FileRenamed or FileChanged

Is there a way to do it?

4

1 回答 1

7

Short answer: No, not as far as I know.

Some technical background here: Rakudo on MoarVM (which is the only backend that supports IO::Notification afaik) depends on libuv for this functionality. If libuv doesn't support it, there only a very small chance that Rakudo will.

I have no idea if libuv supports that functionality. If it does, I suggest you make an issue in MoarVM to draw attention to this. Or even better, write a Pull Request to implement that functionality.

于 2020-11-20T10:24:42.723 回答