Skip to content

Modern Fs PathEquals

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

Home › Filesystem › Filesystem Library › PathEquals

PathEquals

Returns true if two paths match once normalised; case-insensitive on Windows.

Syntax

PathEquals( a, b )

Notes

  • normalized, case-insensitive on Windows

Examples

#import "std/fs"
using fs

'' Compares NORMALIZED paths, and case-insensitively where the grammar
'' says the platform is
print PathEquals( "C:\dev\src", "C:\dev\\src\" )    '' true
print PathEquals( "C:\DEV", "c:\dev" )               '' true on Windows

print PathEquals( "C:\dev", "C:\other" )             '' false

'' Still PURE: it compares text, so two different paths that happen to
'' reach the same file through a symlink are not equal here

Library: Filesystem Library
Category: Filesystem
Documented under: Paths

Clone this wiki locally