Skip to content

Modern Fs FileInfo IsHidden

Paul Squires edited this page Nov 9, 2026 · 6 revisions

Home › Filesystem › Filesystem Library › FileInfo.IsHidden

FileInfo.IsHidden

Returns true if hidden: the hidden flag on Windows, a leading dot on Linux and macOS.

Syntax

FileInfo.IsHidden( )

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 Stat( p ).Value( ).IsHidden( )      '' false

SetHidden( p, true )
print Stat( p ).Value( ).IsHidden( )     '' true

'' PORTABLE IN NAME ONLY: the hidden attribute on Windows, a leading dot
'' on POSIX -- and on POSIX that means SetHidden RENAMES the file
SetHidden( p, false )

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Metadata

Clone this wiki locally