--- IO-AIO/README 2005/08/30 15:45:10 1.13 +++ IO-AIO/README 2006/03/01 23:56:55 1.16 @@ -15,6 +15,10 @@ $_[0] > 0 or die "read error: $!"; }; + # AnyEvent + open my $fh, "<&=" . IO::AIO::poll_fileno or die "$!"; + my $w = AnyEvent->io (fh => $fh, poll => 'r', cb => sub { IO::AIO::poll_cb }); + # Event Event->io (fd => IO::AIO::poll_fileno, poll => 'r', @@ -198,7 +202,7 @@ Asynchronously rmdir (delete) a directory and call the callback with the result code. - aio_readdir $pathname $callback->($entries) + aio_readdir $pathname, $callback->($entries) Unlike the POSIX call of the same name, "aio_readdir" reads an entire directory (i.e. opendir + readdir + closedir). The entries will not be sorted, and will NOT include the "." and ".." entries. @@ -243,7 +247,7 @@ without a non-initial dot) and likely non-directories (everything else). Then every entry + "/." will be "stat"'ed, likely directories first. This is often faster because filesystems might detect the - type of the entry without reading the inode data (e.g. ext2s + type of the entry without reading the inode data (e.g. ext2fs filetype feature). If that succeeds, it assumes that the entry is a directory or a symlink to directory (which will be checked seperately).