Re: Is there a built in recursive rmdir and mkdir?
On 06/03/2018 01:28 PM, Patrick Spek via perl6-users wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sun, 3 Jun 2018 13:13:31 -0700 ToddAndMargo wrote: Does Perl 6 have a built in recursive rmdir equivalent to LINUX's `rmdir --parents path`? For this, there's `rmtree` in the `File::Directory::Tree` module. It is referenced in the docs: https://docs.perl6.org/routine/rmdir I will put that in my notes Also, does Perl6 have a built in recursive mkdir equivalent to LINUX's `mkdir --parents path`? Also in the docs here: https://docs.perl6.org/routine/mkdir. This behaviour you're looking for is the default behaviour of `mkdir` in Pelr 6. To quote from the docs: Also creates parent directories, as needed (similar to *nix utility mkdir with -p option); that is, mkdir "foo/bar/ber/meow" will create foo, foo/bar, and foo/bar/ber directories if they do not exist, as well as foo/bar/ber/meow. Cool! I did not see that https://docs.perl6.org/routine/mkdir#role_IO and it is right under my nose! Thank you!
Re: Is there a built in recursive rmdir and mkdir?
On 06/03/2018 01:19 PM, Tom Browder wrote: On Sun, Jun 3, 2018 at 3:13 PM, ToddAndMargo wrote: Hi All, Does Perl 6 have a built in recursive rmdir equivalent to LINUX's `rmdir --parents path`? Searching for "rmdir" on the docs site, and selecting the sub rmdir entry, I see the following: To delete non-empty directory, see rmtree in File::Directory::Tree module with a link to the module's github.com repo: https://github.com/labster/p6-file-directory-tree -Tom Thank you. I saw that. I was wondering if there was a build in function for it. I have a Perl 5 recursive delete of an FTP directory tree, where I basically call myself (with a depth limit) to do a recursive delete that I could modify. FTP deletes are no fun as you have to change the names of certain files before they will delete, especially ones with `+++` in the have (thank you Firefox!).
Re: Is there a built in recursive rmdir and mkdir?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sun, 3 Jun 2018 13:13:31 -0700 ToddAndMargo wrote: > Does Perl 6 have a built in recursive rmdir > equivalent to LINUX's `rmdir --parents path`? For this, there's `rmtree` in the `File::Directory::Tree` module. It is referenced in the docs: https://docs.perl6.org/routine/rmdir > Also, does Perl6 have a built in recursive mkdir > equivalent to LINUX's `mkdir --parents path`? Also in the docs here: https://docs.perl6.org/routine/mkdir. This behaviour you're looking for is the default behaviour of `mkdir` in Pelr 6. To quote from the docs: > Also creates parent directories, as needed (similar to *nix utility > mkdir with -p option); that is, mkdir "foo/bar/ber/meow" will create > foo, foo/bar, and foo/bar/ber directories if they do not exist, as > well as foo/bar/ber/meow. -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUT2MACgkQN/W6H45X OE9tPQf/RUGmdavSEDye4RIAbHpIkkikaIfj7dK0ym+63tsb/d1SceBtjK6AX6j8 5mu7/uNYAYWrbOKaxbLCk7lPbT3U20Ata9ntNKadi7irDAo8q9b7y/3GVi2avuQS j9H2HAEtOfwjXhbBpvCo+Hq2XrTT8/wRyDyHFtm59Uqdx8njtpPwmEcDx/+GQj3r d/ASoyTNo12CsL0sxTTpE8P93Gcj/lR7xRdmXAieVjSdz3HM7QNaAYsMi4I//qxq dXONoPtzPrTpH4NJdnfyV+qGG8aHlPEeXAPvKHom92D/TVLu5KQICwqWRddaai9C pFpDXUu/Tsm2DfFIte6QhKdWXq8tKA== =rA+y -END PGP SIGNATURE-
Re: Is there a built in recursive rmdir and mkdir?
On Sun, Jun 3, 2018 at 3:13 PM, ToddAndMargo wrote: > Hi All, > > Does Perl 6 have a built in recursive rmdir > equivalent to LINUX's `rmdir --parents path`? Searching for "rmdir" on the docs site, and selecting the sub rmdir entry, I see the following: To delete non-empty directory, see rmtree in File::Directory::Tree module with a link to the module's github.com repo: https://github.com/labster/p6-file-directory-tree -Tom