Skip to content

Modern Fs PathFilePrefix

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

Home › Filesystem › Filesystem Library › PathFilePrefix

PathFilePrefix

Returns the file name up to its first dot, so a.tar.gz gives a.

Syntax

PathFilePrefix( p [, gram ] )

Notes

  • The file name up to its FIRST dot, a leading dot not counting. PathStem stops at the LAST dot.

Examples

#import "std/fs"
using fs

print PathFilePrefix( "/d/archive.tar.gz", FB_PATH_POSIX )    '' archive
print PathStem( "/d/archive.tar.gz", FB_PATH_POSIX )          '' archive.tar
print PathFilePrefix( ".bashrc", FB_PATH_POSIX )             '' .bashrc

Library: Filesystem Library Category: Filesystem Documented under: Paths

Clone this wiki locally