Home | History | Annotate | Download | only in Scripts

Lines Matching refs:FILE

33 use File::Find;
81 my $file = $_;
84 if ($directoriesToIgnore{$file} or $file =~ /^\../ or $file =~ /^ChangeLog/) {
85 print "Ignoring $File::Find::name\n" if $verbose;
86 $File::Find::prune = 1;
90 return if -d $file;
92 push @paths, $File::Find::name;
180 my $file = shift;
187 # time is to avoid accidental file renamings for short, non-DOM renames.
190 $newFile = "$1$renames{$2}$3" if $file =~ /^(.*\/\w*)($key)(\w*\.\w+)$/;
196 $file = "$1$renames{$2}$3" if $file =~ /^(.*\/)(\w+)(\.\w+)$/ && $renames{$2};
198 return $file;
202 for my $file (sort @paths) {
203 my $f = renameFile($file);
204 if ($f ne $file) {
205 $newFile{$file} = $f;
209 for my $file (sort @paths) {
210 if ($newFile{$file}) {
211 my $newFile = $newFile{$file};
212 print "Renaming $file to $newFile\n";
213 scmMoveOrRenameFile($file, $newFile);
217 # change all file contents
219 for my $file (sort @paths) {
220 $file = $newFile{$file} if $newFile{$file};
224 open FILE, $file or die "Failed to open $file";
225 $contents = <FILE>;
226 close FILE;
242 open FILE, ">", $file or die "Failed to open $file";
243 print FILE $newContents;
244 close FILE;