Skip to content

Modern Fs IsFile

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

Home › Filesystem › Filesystem Library › IsFile

IsFile

Returns true if the path is a file, following links; false if it cannot tell.

Syntax

IsFile( p )

Notes

  • boolean -- follows links

Examples

#import "std/fs"
using fs

dim td as FsResultUStr = CreateTempDir( "fbdoc" )
dim as ustring dir_ = td.Value( )
dim as ustring p = PathJoin( dir_, "f.txt" )
WriteAllText( p, "hello" )

print IsFile( p )            '' true
print IsFile( dir_ )         '' false -- a directory is not a file
print IsFile( PathJoin( dir_, "nope" ) )         '' false

'' FOLLOWS SYMLINKS, so a link to a file answers true. LStat is the way
'' to ask about the link itself.

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Metadata

Clone this wiki locally