Labs/Jetpack/JEP/28: Difference between revisions

Jump to navigation Jump to search
added docs for url.toFilename().
(→‎Reference Implementation: added link to cuddlefish lab)
(added docs for url.toFilename().)
Line 216: Line 216:


The <tt>url</tt> module provides functionality for the parsing and retrieving of URLs.
The <tt>url</tt> module provides functionality for the parsing and retrieving of URLs.
<tt>url.'''toFilename'''(''url'')</tt>
Attempts to convert the given URL to a native file path.  This function will automatically attempt to resolve non-file protocols, such as the <tt>resource:</tt> protocol, to their place on the file system. An exception is raised if the URL can't be converted; otherwise, the native file path is returned as a string.


<tt>url.'''resolve'''(''base'', ''relative'')</tt>
<tt>url.'''resolve'''(''base'', ''relative'')</tt>
874

edits

Navigation menu