Aion-Fs
view release on metacpan or search on metacpan
```perl
my $count = 0;
find "ex", sub { find_stop if ++$count == 3; 1} # -> 2
```
## erase (@paths)
УдалÑÐµÑ ÑÐ°Ð¹Ð»Ñ Ð¸ пÑÑÑÑе каÑалоги. ÐозвÑаÑÐ°ÐµÑ `@paths`. ÐÑи оÑибке ввода-вÑвода вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑение.
```perl
eval { erase "/" }; $@ # ~> erase dir /: Device or resource busy
eval { erase "/dev/null" }; $@ # ~> erase file /dev/null: Permission denied
```
### See also
* `unlink` + `rmdir`.
* [File::Path](https://metacpan.org/pod/File::Path) â `remove_tree("dir")`.
* [File::Path::Tiny](https://metacpan.org/pod/File::Path::Tiny) â `File::Path::Tiny::rm($path)`. Ðе вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑений.
* [Mojo::File](https://metacpan.org/pod/Mojo::File) â `path($file)->remove`.
lib/Aion/Fs.md view on Meta::CPAN
```perl
my $count = 0;
find "ex", sub { find_stop if ++$count == 3; 1} # -> 2
```
## erase (@paths)
УдалÑÐµÑ ÑÐ°Ð¹Ð»Ñ Ð¸ пÑÑÑÑе каÑалоги. ÐозвÑаÑÐ°ÐµÑ `@paths`. ÐÑи оÑибке ввода-вÑвода вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑение.
```perl
eval { erase "/" }; $@ # ~> erase dir /: Device or resource busy
eval { erase "/dev/null" }; $@ # ~> erase file /dev/null: Permission denied
```
### See also
* `unlink` + `rmdir`.
* [File::Path](https://metacpan.org/pod/File::Path) â `remove_tree("dir")`.
* [File::Path::Tiny](https://metacpan.org/pod/File::Path::Tiny) â `File::Path::Tiny::rm($path)`. Ðе вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑений.
* [Mojo::File](https://metacpan.org/pod/Mojo::File) â `path($file)->remove`.
lib/Aion/Fs.pm view on Meta::CPAN
ÐÑÑÐ°Ð½Ð°Ð²Ð»Ð¸Ð²Ð°ÐµÑ C<find> бÑдÑÑи вÑзван в одном из его ÑилÑÑÑов, C<errorenter> или C<noenter>.
my $count = 0;
find "ex", sub { find_stop if ++$count == 3; 1} # -> 2
=head2 erase (@paths)
УдалÑÐµÑ ÑÐ°Ð¹Ð»Ñ Ð¸ пÑÑÑÑе каÑалоги. ÐозвÑаÑÐ°ÐµÑ C<@paths>. ÐÑи оÑибке ввода-вÑвода вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑение.
eval { erase "/" }; $@ # ~> erase dir /: Device or resource busy
eval { erase "/dev/null" }; $@ # ~> erase file /dev/null: Permission denied
=head3 See also
=over
=item * C<unlink> + C<rmdir>.
=item * L<File::Path> â C<remove_tree("dir")>.
t/aion/fs.t view on Meta::CPAN
done_testing; }; subtest 'find_stop ()' => sub {
my $count = 0;
::is scalar do {find "ex", sub { find_stop if ++$count == 3; 1}}, scalar do{2}, 'find "ex", sub { find_stop if ++$count == 3; 1} # -> 2';
#
# ## erase (@paths)
#
# УдалÑÐµÑ ÑÐ°Ð¹Ð»Ñ Ð¸ пÑÑÑÑе каÑалоги. ÐозвÑаÑÐ°ÐµÑ `@paths`. ÐÑи оÑибке ввода-вÑвода вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑение.
#
done_testing; }; subtest 'erase (@paths)' => sub {
::like scalar do {eval { erase "/" }; $@}, qr!erase dir /: Device or resource busy!, 'eval { erase "/" }; $@ # ~> erase dir /: Device or resource busy';
::like scalar do {eval { erase "/dev/null" }; $@}, qr!erase file /dev/null: Permission denied!, 'eval { erase "/dev/null" }; $@ # ~> erase file /dev/null: Permission denied';
#
# ### See also
#
# * `unlink` + `rmdir`.
# * [File::Path](https://metacpan.org/pod/File::Path) â `remove_tree("dir")`.
# * [File::Path::Tiny](https://metacpan.org/pod/File::Path::Tiny) â `File::Path::Tiny::rm($path)`. Ðе вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑений.
# * [Mojo::File](https://metacpan.org/pod/Mojo::File) â `path($file)->remove`.
#
( run in 0.281 second using v1.01-cache-2.11-cpan-87723dcf8b7 )