Skip to content

Modern Fs PathIsAbsolute

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

Home › Filesystem › Filesystem Library › PathIsAbsolute

PathIsAbsolute

Returns true if a path needs no current folder; C:dev and \dev are not absolute.

Syntax

PathIsAbsolute( p )

Notes

  • see the Windows note below

Examples

#import "std/fs"
using fs

print PathIsAbsolute( "C:\dev" )          '' true
print PathIsAbsolute( "dev\src" )        '' false

'' A ROOTED BUT DRIVE-RELATIVE Windows path is NOT absolute: "\dev"
'' means "the current drive's \dev", so it still depends on where you
'' are
print PathIsAbsolute( "\dev" )           '' false
print PathIsAbsolute( "\\srv\share" )    '' true -- UNC needs no drive

Library: Filesystem Library
Category: Filesystem
Documented under: Paths

Clone this wiki locally