Ignore:
Timestamp:
05/24/13 09:38:39 (8 years ago)
Author:
jmt12
Message:

Adding canRead() and isAbsolute() functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/perllib/FileUtils/LocalFS.pm

    r27386 r27422  
    2828# Pragma
    2929use strict;
     30
     31
     32## @function canRead()
     33#
     34sub canRead
     35{
     36  my $path = shift(@_);
     37  return &fileTest($path, '-R');
     38}
     39## canRead()
    3040
    3141
     
    117127}
    118128## fileTest()
     129
     130
     131## @function isFilenameAbsolute()
     132#
     133sub isFilenameAbsolute
     134{
     135  my ($filename) = @_;
     136  if ($ENV{'GSDLOS'} =~ /^windows$/i)
     137  {
     138    return ($filename =~ m/^(\w:)?\\/);
     139  }
     140  return ($filename =~ m/^\//);
     141}
     142# isFilenameAbsolute()
    119143
    120144
Note: See TracChangeset for help on using the changeset viewer.