--- IO-AIO/AIO.pm 2005/08/22 23:20:37 1.35 +++ IO-AIO/AIO.pm 2005/08/28 11:05:50 1.39 @@ -65,11 +65,13 @@ use Fcntl (); BEGIN { - $VERSION = 1.5; + $VERSION = 1.6; - @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink - aio_rmdir aio_symlink aio_fsync aio_fdatasync aio_readahead); - @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); + @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat + aio_lstat aio_unlink aio_rmdir aio_readdir aio_symlink + aio_fsync aio_fdatasync aio_readahead); + @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel + max_outstanding nreqs); require XSLoader; XSLoader::load IO::AIO, $VERSION; @@ -177,15 +179,15 @@ socket, and C<$in_fh> should refer to mmap'able file. If the native sendfile call fails or is not implemented, it will be -emulated, so you can call C on any filehandles regardless of -the limitations of the OS. +emulated, so you can call C on any type of filehandle +regardless of the limitations of the operating system. Please note, however, that C can read more bytes from C<$in_fh> than are written, and there is no way to find out how many -bytes have been read form C alone, as C only -provides the number of bytes written to C<$out_fh>. Only if the return -value (the value provided to the callback) equals C<$length> one can -assume that C<$length> bytes have been read. +bytes have been read from C alone, as C only +provides the number of bytes written to C<$out_fh>. Only if the result +value equals C<$length> one can assume that C<$length> bytes have been +read. =item aio_readahead $fh,$offset,$length, $callback @@ -233,6 +235,15 @@ Asynchronously rmdir (delete) a directory and call the callback with the result code. +=item aio_readdir $pathname $callback + +Unlike the POSIX call of the same name, C reads an entire +directory (i.e. opendir + readdir + closedir). The entries will not be +sorted, and will B include the C<.> and C<..> entries. + +The callback a single argument which is either C or an array-ref +with the filenames. + =item aio_fsync $fh, $callback Asynchronously call fsync on the given filehandle and call the callback