Subversion Repositories DevTools

Rev

Rev 4344 | Rev 4546 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4344 Rev 4421
Line 28... Line 28...
28
#                    FileIsNewer                - Test if newer
28
#                    FileIsNewer                - Test if newer
29
#                    DisplayPath                - Genate a Path that can be displayed
29
#                    DisplayPath                - Genate a Path that can be displayed
30
#                    FileCreate                 - Create a simple text file
30
#                    FileCreate                 - Create a simple text file
31
#                    FileAppend                 - Append to a simple text file
31
#                    FileAppend                 - Append to a simple text file
32
#                    RmDirTree                  - Remove a directory tree
32
#                    RmDirTree                  - Remove a directory tree
33
#
33
#           ReExported
-
 
34
#                    catdir                     - Concatenate path elements
-
 
35
#                    catfile                    - Concatenate path elements and a file
34
#
36
#
35
#......................................................................#
37
#......................................................................#
36
 
38
 
37
use 5.006_001;
39
use 5.006_001;
38
use strict;
40
use strict;
Line 368... Line 370...
368
#
370
#
369
# Description     : Return the relative path to the current working directory
371
# Description     : Return the relative path to the current working directory
370
#                   as provided in $Cwd
372
#                   as provided in $Cwd
371
#
373
#
372
# Inputs          : $base       - Base directory to convert
374
# Inputs          : $base       - Base directory to convert
-
 
375
#                                 Expected to be well formed absolute path
373
#                   $here       - Optional current directory
376
#                   $here       - Optional current directory
-
 
377
#                                 Expected to be well formed absolute path
374
#                                 $Cwd will be used if non provided
378
#                                 $Cwd will be used if non provided
375
#
379
#
376
# Returns         : Relative path from the current directory to the base directory
380
# Returns         : Relative path from the current directory to the base directory
377
#
381
#
378
sub RelPath
382
sub RelPath
Line 385... Line 389...
385
    my $result;
389
    my $result;
386
 
390
 
387
    Debug("RelPath: Here  : $here");
391
    Debug("RelPath: Here  : $here");
388
    Debug("RelPath: Source: $base");
392
    Debug("RelPath: Source: $base");
389
 
393
 
-
 
394
    # Not absolute - just return it
390
    return $base unless ( $base =~ m~^/~ );
395
    return $base unless ( $base =~ m~^/~ );
391
    
396
    
392
    #
397
    #
393
    #   Remove common bits from the head of both lists
398
    #   Remove common bits from the head of both lists
394
    #
399
    #