--- IO-AIO/README 2006/02/01 23:43:17 1.15 +++ IO-AIO/README 2006/06/26 14:53:55 1.17 @@ -136,6 +136,23 @@ print "read $_[0] bytes: <$buffer>\n"; }; + aio_move $srcpath, $dstpath, $callback->($status) + [EXPERIMENTAL] + + Try to move the *file* (directories not supported as either source + or destination) from $srcpath to $dstpath and call the callback with + the 0 (error) or -1 ok. + + This is a composite request that tries to rename(2) the file first. + If rename files with "EXDEV", it creates the destination file with + mode 0200 and copies the contents of the source file into it using + "aio_sendfile", followed by restoring atime, mtime, access mode and + uid/gid, in that order, and unlinking the $srcpath. + + If an error occurs, the partial destination file will be unlinked, + if possible, except when setting atime, mtime, access mode and + uid/gid, where errors are being ignored. + aio_sendfile $out_fh, $in_fh, $in_offset, $length, $callback->($retval) Tries to copy $length bytes from $in_fh to $out_fh. It starts reading at byte offset $in_offset, and starts writing at the current @@ -198,6 +215,19 @@ Asynchronously unlink (delete) a file and call the callback with the result code. + aio_link $srcpath, $dstpath, $callback->($status) + Asynchronously create a new link to the existing object at $srcpath + at the path $dstpath and call the callback with the result code. + + aio_symlink $srcpath, $dstpath, $callback->($status) + Asynchronously create a new symbolic link to the existing object at + $srcpath at the path $dstpath and call the callback with the result + code. + + aio_rename $srcpath, $dstpath, $callback->($status) + Asynchronously rename the object at $srcpath to $dstpath, just as + rename(2) and call the callback with the result code. + aio_rmdir $pathname, $callback->($status) Asynchronously rmdir (delete) a directory and call the callback with the result code. @@ -247,7 +277,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).