develooper Front page | perl.perl6.users | Postings from December 2019

rmdir question

Thread Next
From:
ToddAndMargo via perl6-users
Date:
December 3, 2019 02:37
Subject:
rmdir question
Message ID:
d97c9e4a-f32a-35e2-63be-40fe73b067cc@zoho.com
Hi All,

 From the manual page of rmdir:
https://docs.perl6.org/routine/rmdir

       sub    rmdir(*@dirs --> List:D)
       method rmdir(IO::Path:D: --> True)

Does *@dirs mean I can give it multiple directories
as an array?

What does  "--> List:D" give me back?  An array
of Booleans as to which directories successfully removed?
And what is a "List:D?" anyway?


      ...throws an exception of type X::IO::Rmdir if
      the directory cannot be removed

Does this crash the program or just return a "false"?
Does it tell me what went wrong, as in "so and so" has
"such and such" file(s) open and locked?

To delete non-empty directory, see rmtree in File::Directory::Tree module.

Seems to me I should not have to import a module for
this.  Most rmdir command have a "parents" flag.  Am
I missing something?

Many thanks,
-T



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A computer without Microsoft is like
a chocolate cake without the mustard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About