Core Function GetRelativePath

From Sputnik Wiki
Revision as of 11:00, 18 June 2015 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
GetRelativePath( <Path1>, <path2> )

Contents

Description

Try makes a path relative to another.

Parameters

path1 : pathToWhichToMakeRelativeTo

The path to which to make relative to.

path2 : pathToMakeRelative

The path to make relative.

Return Value

Success: Returns the relative path.

Failure: Returns a copy of the pathToMakeRelative.

Remarks

None

Example

// Path To Which To MakeRelative To
my $first = @"c:\folder1\folder2\folder4";
// Path To Make Relative
my $second = @"c:\folder1\folder2\folder3\file1.txt";
// Get the relative path
my $path =  GetRelativePath($first, $second);
// Print it
say $path;
// PRINTS:
// ..\folder3\file1.txt
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox