Skip to content

Modern Fs FileInfo IsSymlink

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

Home › Filesystem › Filesystem Library › FileInfo.IsSymlink

FileInfo.IsSymlink

Returns true if the path is a symbolic link; only ever true from LStat.

Syntax

FileInfo.IsSymlink( )

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" )

'' Through Stat this is always FALSE -- Stat follows the link and
'' reports the target. Ask LStat to see the link itself.
print Stat( p ).Value( ).IsSymlink( )    '' false
print LStat( p ).Value( ).IsSymlink( )   '' false -- an ordinary file

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Metadata

Clone this wiki locally