… | |
… | |
631 | |
631 | |
632 | Try to move the I<file> (directories not supported as either source or |
632 | Try to move the I<file> (directories not supported as either source or |
633 | destination) from C<$srcpath> to C<$dstpath> and call the callback with |
633 | destination) from C<$srcpath> to C<$dstpath> and call the callback with |
634 | the C<0> (error) or C<-1> ok. |
634 | the C<0> (error) or C<-1> ok. |
635 | |
635 | |
636 | This is a composite request that tries to rename(2) the file first. If |
636 | This is a composite request that tries to rename(2) the file first; if |
637 | rename files with C<EXDEV>, it copies the file with C<aio_copy> and, if |
637 | rename fails with C<EXDEV>, it copies the file with C<aio_copy> and, if |
638 | that is successful, unlinking the C<$srcpath>. |
638 | that is successful, unlinks the C<$srcpath>. |
639 | |
639 | |
640 | =cut |
640 | =cut |
641 | |
641 | |
642 | sub aio_move($$;$) { |
642 | sub aio_move($$;$) { |
643 | my ($src, $dst, $cb) = @_; |
643 | my ($src, $dst, $cb) = @_; |