Skip to content

Modern Fs PathSeparator

Paul Squires edited this page Nov 9, 2026 · 6 revisions

Home › Filesystem › Filesystem Library › PathSeparator

PathSeparator

Returns the platform's path separator: a backslash on Windows, a slash on Linux and macOS.

Syntax

PathSeparator( )

Notes

  • "" or "/"

Examples

#import "std/fs"
using fs

'' The native separator, as a string
print PathSeparator( )       '' \ on Windows, / elsewhere

'' Or ask for a grammar explicitly -- every Path* function takes the
'' same optional final argument
print PathSeparator( FB_PATH_POSIX )     '' /
print PathSeparator( FB_PATH_WIN32 )     '' \

Library: Filesystem Library
Category: Filesystem
Documented under: Paths

Clone this wiki locally