Skip Menu |
Report information
Id: 129150
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: liukan [at] 360.cn
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Date: Wed, 31 Aug 2016 09:24:28 +0000
From: 刘刊 <liukan [...] 360.cn>
To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
Subject: [RFC][BUG] IO::Notification needs .stat and seperate notification for removal
Download (untitled) / with headers
text/plain 561b
Two scenarios will render the following code "useless".

my $p = Promise.new;
IO::Notification.watch-path( 'a' ).act: { .event.say; }
await $p;

1. If file or directory 'a' does not exist, no Failure.
2. If 'a' initially exists, then removed/moved, then a new 'a' is created, the new 'a' no longer has the identity of the initial file/dir that was 'a'. Subsequent behavior is same as that of 1.

Lacking a .stat method, and a way of notifying removal, there isn't a good way to track the original target, and figure out nature of the change.

- kan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org