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: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.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

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


Path.FilePathToFileURL - Path.LastPathComponent

Feedback: Report problem or ask question.