ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/Utilities/AddDir.pm
(Generate patch)

Comparing COMP/SCRAM/src/Utilities/AddDir.pm (file contents):
Revision 1.9 by sashby, Wed Feb 2 16:31:13 2005 UTC vs.
Revision 1.10 by sashby, Wed Aug 10 17:27:32 2005 UTC

# Line 1 | Line 1
1 + =head1 NAME
2 +
3 + Utilities::AddDir - Utility functions for creating or copying directories.
4 +
5 + =head1 SYNOPSIS
6 +
7 +        &Utilities::AddDir::adddir($dir);
8 +        &Utilities::AddDir::copydir($src,$dest);
9 +        &Utilities::AddDir::copydirwithskip($src,$dest,@files_to_skip);
10 +
11 + =head1 METHODS
12 +
13 + =over
14 +
15 + =cut
16 +
17   package AddDir;
18   require 5.001;
19   require Exporter;
# Line 5 | Line 21 | use Cwd;
21   @ISA    = qw(Exporter);
22   @EXPORT = qw(adddir copydir copydirwithskip);
23  
24 + =item   C<adddir($dir)>
25 +
26 + Create a new directory.
27 +
28 + =cut
29  
30   sub adddir {
31   my $indir=shift;
# Line 28 | Line 49 | sub adddir {
49   chdir $startdir;
50   }
51  
52 +
53 + =item   C<copydir($src, $dest)>
54 +
55 + Copy a directory $src and contents to $dest.
56 +
57 + =cut
58 +
59   sub copydir
60     {
61     my $src=shift;
# Line 65 | Line 93 | sub copydir
93        }
94     }
95  
96 + =item   C<copydirwithskip($src, $dest, @files_to_skip)>
97 +
98 + Recursively copy a directory $src to $dest. All files
99 + in @files_to_skip will be skipped.
100 +
101 + =cut
102 +
103   sub copydirwithskip
104     {
105     my $src=shift;
# Line 112 | Line 147 | sub copydirwithskip
147        die "Attempt to open a non-existent directory ($src). Exitting\n";
148        }
149     }
150 +
151 + =back
152 +
153 + =head1 AUTHOR
154 +
155 + Originally written by Christopher Williams.
156 +
157 + =head1 MAINTAINER
158 +
159 + Shaun ASHBY L<mailTo:Shaun.Ashby@cern.ch>
160 +
161 + =cut
162 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines