fcf.getPath() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Translates a relative URI in FCF notation into a real resource path
If the path is given in FCF notation, then the real path to the resource is returned. If a valid path to the resource is passed, then its normalized version is returned (using the
Arguments
- Source path.
- Aliases object. The alias is the key and the value is the path.
- If true then a_path contains the path on the server, otherwise a_path is the network address
Result
- Real resource address
Example: Applying a function on the server side
{
let result = fcf.getPath("fcf-framework-core:");
console.log(result);
}
{
let result = fcf.getPath("fcf-framework-core:fcf.js");
console.log(result);
}
{
let result = fcf.getPath("index.js");
console.log(result);
}
Output:
/home/user/development/project/node_modules/fcf-framework-core
/home/user/development/project/node_modules/fcf-framework-core/fcf.js
/home/user/development/project/index.js