ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.276 by root, Fri Sep 22 05:24:41 2017 UTC vs.
Revision 1.277 by root, Fri Sep 22 12:17:49 2017 UTC

1079Scans a directory (similar to C<aio_readdir>) but additionally tries to 1079Scans a directory (similar to C<aio_readdir>) but additionally tries to
1080efficiently separate the entries of directory C<$path> into two sets of 1080efficiently separate the entries of directory C<$path> into two sets of
1081names, directories you can recurse into (directories), and ones you cannot 1081names, directories you can recurse into (directories), and ones you cannot
1082recurse into (everything else, including symlinks to directories). 1082recurse into (everything else, including symlinks to directories).
1083 1083
1084C<aio_scandir> is a composite request that creates of many sub requests_ 1084C<aio_scandir> is a composite request that generates many sub requests.
1085C<$maxreq> specifies the maximum number of outstanding aio requests that 1085C<$maxreq> specifies the maximum number of outstanding aio requests that
1086this function generates. If it is C<< <= 0 >>, then a suitable default 1086this function generates. If it is C<< <= 0 >>, then a suitable default
1087will be chosen (currently 4). 1087will be chosen (currently 4).
1088 1088
1089On error, the callback is called without arguments, otherwise it receives 1089On error, the callback is called without arguments, otherwise it receives
1608There are some caveats: when directories get renamed (or deleted), the 1608There are some caveats: when directories get renamed (or deleted), the
1609pathname string doesn't change, so will point to the new directory (or 1609pathname string doesn't change, so will point to the new directory (or
1610nowhere at all), while the directory fd, if available on the system, 1610nowhere at all), while the directory fd, if available on the system,
1611will still point to the original directory. Most functions accepting a 1611will still point to the original directory. Most functions accepting a
1612pathname will use the directory fd on newer systems, and the string on 1612pathname will use the directory fd on newer systems, and the string on
1613older systems. Some functions (such as realpath) will always rely on the 1613older systems. Some functions (such as C<aio_realpath>) will always rely on
1614string form of the pathname. 1614the string form of the pathname.
1615 1615
1616So this functionality is mainly useful to get some protection against 1616So this functionality is mainly useful to get some protection against
1617C<chdir>, to easily get an absolute path out of a relative path for future 1617C<chdir>, to easily get an absolute path out of a relative path for future
1618reference, and to speed up doing many operations in the same directory 1618reference, and to speed up doing many operations in the same directory
1619(e.g. when stat'ing all files in a directory). 1619(e.g. when stat'ing all files in a directory).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines