====== GETRELATIVEPATH method (Filesystem) ====== ==== Description ==== Resolves an absolute path to a relative one. ==== Syntax ==== RelPath = Exec_Method( "FILESYSTEM", "GETRELATIVEPATH", AbsolutePath, RelativeToPath ) ==== Parameters ==== ^Name^Required^Description^ |AbsolutePath|Yes|Specifies the absolute path to resolve.| |RelativeToPath|No|Specifies the reference path for the resolution. If this parameter is null then the current directory is used.| ==== Returns ==== The relative path if successful, or null if the absolute path cannot be resolved. ==== Remarks ==== This method does not check if the returned relative path actually exists. ==== Example ==== // Use GETRELATIVEPATH to resolve a an absolute directory to // the current directory // // (Assume current directory is "c:\revsoft\openinsight") // AbsPath = "c:\revsoft\my_data" RelPath = Exec_Method( "FILESYSTEM", "GETRELATIVEPATH", AbsPath, "" ) // RelPath should be: "..\my_data" // Use GETRELATIVEPATH to resolve an absolute directory to // a specified reference directory AbsPath = "c:\my_root_dir" RefPath = "c:\revsoft\openinsight\apps" RelPath = Exec_Method( "FILESYSTEM", "GETRELATIVEPATH", AbsPath, RefPath) // RelPath should be: "\my_root_dir" ==== See Also ==== GETSHORTPATH method.