Resolves an absolute path to a relative one.
RelPath = Exec_Method( "FILESYSTEM", "GETRELATIVEPATH", AbsolutePath, RelativeToPath )
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. |
The relative path if successful, or null if the absolute path cannot be resolved.
This method does not check if the returned relative path actually exists.
// 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"
GETSHORTPATH method.