functiongetAbsolutePath
Gets the absolute path of a URI
Information
This function returns the absolute path of the uniform resource identifier by searching for a file with the name
file://uri modelica://uri modelica://dhcSim/uri
The function returns the absolute path of the first file that is found, using the above search order.
If the file is not found, then this function terminates with an assert.
This function has been introduced to allow users to specify the name of weather data files with a path that is relative to the library path. This allows users to change the current working directory while still being able to read the files.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | uri | A uri |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | path | The absolute path of the file pointed to by the URI |
Contents
| Name | Description |
|---|---|
| loadResourceprotected |
Revisions
-
October 8, 2013, by Michael Wetter:
Improved algorithm that determines the absolute path of the file. Now the function works from any directory as long as thedhcSimlibrary is on theMODELICAPATH. -
May 2, 2013, by Michael Wetter:
First implementation.