.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "File::Remove 3pm" .TH File::Remove 3pm "2016-04-24" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" File::Remove \- Remove files and directories .SH "VERSION" .IX Header "VERSION" version 1.57 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use File::Remove \*(Aqremove\*(Aq; \& \& # removes (without recursion) several files \& remove( \*(Aq*.c\*(Aq, \*(Aq*.pl\*(Aq ); \& \& # removes (with recursion) several directories \& remove( \e1, qw{directory1 directory2} ); \& \& # removes (with recursion) several files and directories \& remove( \e1, qw{file1 file2 directory1 *~} ); \& \& # removes without globbing: \& remove( \e1, {glob => 0}, \*(Aq*\*(Aq); \& \& # trashes (with support for undeleting later) several files \& trash( \*(Aq*~\*(Aq ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBFile::Remove::remove\fR removes files and directories. It acts like \&\fB/bin/rm\fR, for the most part. Although \f(CW\*(C`unlink\*(C'\fR can be given a list of files, it will not remove directories; this module remedies that. It also accepts wildcards, * and ?, as arguments for filenames. .PP \&\fBFile::Remove::trash\fR accepts the same arguments as \fBremove\fR, with the addition of an optional, infrequently used \*(L"other platforms\*(R" hashref. .SH "SUBROUTINES" .IX Header "SUBROUTINES" .SS "remove" .IX Subsection "remove" Removes files and directories. Directories are removed recursively like in \fBrm \-rf\fR if the first argument is a reference to a scalar that evaluates to true. If the first argument is a reference to a scalar, then it is used as the value of the recursive flag. By default it's false so only pass \e1 to it. .PP If the next argument is a hash reference then it is a key/values of options. Currently, there is one supported option of \f(CW\*(C`\*(Aqglob\*(Aq => 0\*(C'\fR which prevents globbing. E.g: .PP .Vb 1 \& remove(\e1, {glob => 0}, \*(Aq*\*(Aq); .Ve .PP Will not remove files globbed by '*' and will only remove the file called asterisk if it exists. .PP In list context it returns a list of files/directories removed, in scalar context it returns the number of files/directories removed. The list/number should match what was passed in if everything went well. .SS "rm" .IX Subsection "rm" Just calls \fBremove\fR. It's there for people who get tired of typing \&\fBremove\fR. .SS "clear" .IX Subsection "clear" The \f(CW\*(C`clear\*(C'\fR function is a version of \f(CW\*(C`remove\*(C'\fR designed for use in test scripts. It takes a list of paths that it will both initially delete during the current test run, and then further flag for deletion at END-time as a convenience for the next test run. .SS "trash" .IX Subsection "trash" Removes files and directories, with support for undeleting later. Accepts an optional \*(L"other platforms\*(R" hashref, passing the remaining arguments to \fBremove\fR. .IP "Win32" 4 .IX Item "Win32" Requires Win32::FileOp. .Sp Installation not actually enforced on Win32 yet, since Win32::FileOp has badly failing dependencies at time of writing. .IP "\s-1OS X\s0" 4 .IX Item "OS X" Requires Mac::Glue. .IP "Other platforms" 4 .IX Item "Other platforms" The first argument to \fItrash()\fR must be a hashref with two keys, \&'rmdir' and 'unlink', each referencing a coderef. The coderefs will be called with the filenames that are to be deleted. .SS "expand" .IX Subsection "expand" \&\fB\s-1DO NOT USE.\s0\fR Kept for legacy. .SS "undelete" .IX Subsection "undelete" \&\fB\s-1DO NOT USE.\s0\fR Kept for legacy. .SH "SUPPORT" .IX Header "SUPPORT" Bugs should always be submitted via the \s-1CPAN\s0 bug tracker .PP .PP For other issues, contact the maintainer. .SH "AUTHOR" .IX Header "AUTHOR" Adam Kennedy .SH "COPYRIGHT" .IX Header "COPYRIGHT" Taken over by Shlomi Fish () while disclaiming all rights and placing his modifications under CC0/public\-domain/MIT/any\-other\-licence. .PP Some parts copyright 2006 \- 2012 Adam Kennedy. .PP Taken over by Adam Kennedy to fix the \&\*(L"deep readonly files\*(R" bug, and do some package cleaning. .PP Some parts copyright 2004 \- 2005 Richard Soderberg. .PP Taken over by Richard Soderberg to port it to File::Spec and add tests. .PP Original copyright: 1998 by Gabor Egressy, . .PP This program is free software; you can redistribute and/or modify it under the same terms as Perl itself. .SH "AUTHOR" .IX Header "AUTHOR" Shlomi Fish .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 1998 by Gabor Egressy. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/NoAuth/Bugs.html?Dist=File\-Remove or by email to bug\-file\-remove@rt.cpan.org. .PP When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. .SH "SUPPORT" .IX Header "SUPPORT" .SS "Perldoc" .IX Subsection "Perldoc" You can find documentation for this module with the perldoc command. .PP .Vb 1 \& perldoc File::Remove .Ve .SS "Websites" .IX Subsection "Websites" The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. .IP "\(bu" 4 MetaCPAN .Sp A modern, open-source \s-1CPAN\s0 search engine, useful to view \s-1POD\s0 in \s-1HTML\s0 format. .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp The default \s-1CPAN\s0 search engine, useful to view \s-1POD\s0 in \s-1HTML\s0 format. .Sp .IP "\(bu" 4 \&\s-1RT: CPAN\s0's Bug Tracker .Sp The \s-1RT \s0( Request Tracker ) website is the default bug/issue tracking system for \s-1CPAN.\s0 .Sp .IP "\(bu" 4 AnnoCPAN .Sp The AnnoCPAN is a website that allows community annotations of Perl module documentation. .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp The \s-1CPAN\s0 Ratings is a website that allows community ratings and reviews of Perl modules. .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Forum .Sp The \s-1CPAN\s0 Forum is a web forum for discussing Perl modules. .Sp .IP "\(bu" 4 \&\s-1CPANTS\s0 .Sp The \s-1CPANTS\s0 is a website that analyzes the Kwalitee ( code metrics ) of a distribution. .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Testers .Sp The \s-1CPAN\s0 Testers is a network of smokers who run automated tests on uploaded \s-1CPAN\s0 distributions. .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Testers Matrix .Sp The \s-1CPAN\s0 Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Testers Dependencies .Sp The \s-1CPAN\s0 Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. .Sp .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests by email to \f(CW\*(C`bug\-file\-remove at rt.cpan.org\*(C'\fR, or through the web interface at . You will be automatically notified of any progress on the request by the system. .SS "Source Code" .IX Subsection "Source Code" The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) .PP .PP .Vb 1 \& git clone git://github.com/shlomif/File\-Remove.git .Ve