Skip to content

Modern Fs PathToNative

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Filesystem › Filesystem Library › PathToNative

PathToNative

Returns the path with the platform's separators, duplicates collapsed, nothing resolved.

Syntax

PathToNative( p )

Notes

  • separators to native, duplicates collapsed, but

Examples

#import "std/fs"
using fs

'' Rewrites the separators to the platform's own, so a path read from a
'' config file written on the other platform still works
print PathToNative( "C:/work/src" )      '' C:\work\src on Windows

'' It changes separators only -- it does not normalise, resolve or
'' validate anything
print PathToNative( "a/b//c" )

Library: Filesystem Library
Category: Filesystem
Documented under: Paths

Clone this wiki locally