Skip to content
This repository
tag: v18
Fetching contributors…

Cannot retrieve contributors at this time

file 15 lines (10 sloc) 0.31 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
my $fsw = CLR::<System.IO.FileSystemWatcher,System,PublicKeyToken=b77a5c561934e089>.new;

$fsw.Path = '.';

sub handler($, $event) {
    say "$event.ChangeType() ($event.Name())";
}

$fsw.add_Changed(&handler);
$fsw.add_Deleted(&handler);
$fsw.add_Created(&handler);

$fsw.EnableRaisingEvents = True;

+lines;
Something went wrong with that request. Please try again.