Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4    Statistic    FMM    Blog  

Path.FileURLToFilePath

Converts a file URL to a local file path.

Component Version macOS Windows Linux Server iOS SDK
Path 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Path.FileURLToFilePath"; URL )   More

Parameters

Parameter Description Example
URL The file URL to convert. "file://localhost/Users/cs/Desktop/test.html"

Result

Returns path or error.

Description

Converts a file URL to a local file path.

Examples

Converts a path URL:

/* returns /Users/cs/Desktop/test.html */
MBS( "Path.FileURLToFilePath"; "file://localhost/Users/cs/Desktop/test.html" )

Example result: "/Users/cs/Desktop/test.html"

Converts file URL on Windows to path:

MBS( "Path.FileURLToFilePath"; "file://C:/Users/Christian/Desktop/test.html")

Example result: "/Users/Christian/Desktop/test.html"

Blog Entries

This function checks for a license.

Created 30th January 2015, last changed 11st December 2016


Path.FilePathToFileURL - Path.LastPathComponent

💬 Ask a question or report a problem