Convert a local path to a URI in either the install root, userdata directory, or selected blog.
If a blog or entry is specified, then these will be used first when trying to resolve the URI of a relative file path. That is, if you pass a relative path, the entry will be checked first, then the blog, then userdata and install root.
path | The path for which to get the URI |
blog Blog$ | The blog in which to search |
entry | The entry in which to search |
String containing the URI or the unmodified path if it could not be converted.
public function absoluteLocalpathToUri( |
| ) |
Convert an absolute path to a URI. This will search for the file in all registered blogs as well as userdata and install root
path | The path to convert ot a URI |
A string containing the URI or the unmodified path if resolution failed
public function uriToLocalpath( |
| ) |
Convert a URI into a local path, based on the registered blogs, userdata, and install root directories
uri | The URI string to convert to a local path |
blog Blog$ | The optional blog |
String containing the local path or the unmodified URI if resolution failed