Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Files.StandardizePath

Standardized a path.

Component Version macOS Windows Linux Server iOS SDK
Files 10.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Files.StandardizePath"; Path )   More

Parameters

Parameter Description Example
Path The file path to standardize. "~/test"

Result

Returns OK or error.

Description

Standardized a path.
On MacOS, expands tilde, reduce empty components, references to current directory and symbolic links.
On Windows, we resolve environment variables and get the full path.
On Linux, we resolve symbolic links, reduce empty components and resolve relative paths.

Examples

Resolve path on Mac with ~ inside:

MBS( "Files.StandardizePath"; "~/test/./testing" )

Example result: /Users/cs/test/testing

Resolve environment variable on Windows:

MBS( "Files.StandardizePath"; "%HOMEPATH%\test.txt")

Example result: C:\Users\Christian\test.txt

Resolves on Windows an not needed folder name and two dots:

MBS( "Files.StandardizePath"; "%APPDATA%\notneeded\..\test.txt")

Example result: C:\Users\Christian\AppData\Roaming\test.txt

Release notes

Blog Entries

This function checks for a license.

Created 18th June 2020, last changed 19th June 2020


Files.SetTagNames - Files.StartDownloadingUbiquitousItem