Ignore:
Timestamp:
2013-05-21T14:46:55+12:00 (11 years ago)
Author:
jmt12
Message:

Updating calls to intermediate util functions to the new FileUtils functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/plugins/DirectoryPlugin.pm

    r26987 r27377  
    181181
    182182    # replace -d with function in util library
    183     return undef unless (&util::dir_exists($dirname));
     183    return undef unless (&FileUtils::directoryExists($dirname));
    184184
    185185    return 0 if ($self->{'block_exp'} ne "" && $dirname =~ /$self->{'block_exp'}/);
     
    308308    $block_hash->{'shared_fileroot'} = {} unless defined $block_hash->{'shared_fileroot'};
    309309
    310      # Recur over directory contents.
    311     my (@dir, $subfile);
    312     #my $count = 0;
    313    
     310    # Recur over directory contents.
    314311    print $outhandle "DirectoryPlugin block: getting directory $dirname\n" if ($verbosity > 2);
    315    
     312
    316313    # find all the files in the directory
    317     my $dir_read = &util::file_readdir($dirname, \@dir);
    318     if (!$dir_read) {
    319     if ($gli) {
    320         print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n";
    321     }
    322     print $outhandle "DirectoryPlugin: WARNING - couldn't read directory $dirname\n";
    323     return -1; # error in processing
     314    my @dir = @{&FileUtils::readDirectory($dirname)};
     315    if (scalar(@dir) == 0)
     316    {
     317      if ($gli)
     318      {
     319        print STDERR "<ProcessingError n='$file' r='Could not read directory $dirname'>\n";
     320      }
     321      print $outhandle "DirectoryPlugin: WARNING - couldn't read directory $dirname\n";
     322      return -1; # error in processing
    324323    }
    325324
     
    394393
    395394    # Recur over directory contents.
    396     my (@dir, $subfile);
    397395    print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2);
    398396
    399397    # find all the files in the directory
    400     my $dir_read = &util::file_readdir($dirname, \@dir);
    401     if (!$dir_read)
     398    my @dir = @{&FileUtils::readDirectory($dirname)};
     399    if (scalar(@dir) == 0)
    402400    {
    403401      if ($gli)
Note: See TracChangeset for help on using the changeset viewer.