Skip to content

Modern Fs PathHasExtension

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

Home › Filesystem › Filesystem Library › PathHasExtension

PathHasExtension

Returns true if the file name has an extension; a dotfile has none.

Syntax

PathHasExtension( p )

Examples

#import "std/fs"
using fs

print PathHasExtension( "main.tiko" )       '' true
print PathHasExtension( "README" )        '' false
print PathHasExtension( ".gitignore" )    '' false -- a name, not an extension

'' Reads better than comparing PathExtension against ""

Library: Filesystem Library
Category: Filesystem
Documented under: Paths

Clone this wiki locally