Skip to content

Modern Fs FileInfo HasAccessed

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

Home › Filesystem › Filesystem Library › FileInfo.HasAccessed

FileInfo.HasAccessed

Returns true if the platform records access times, so Accessed means something.

Syntax

FileInfo.HasAccessed( )

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

dim info as FileInfo = Stat( p ).Value( )

print info.HasAccessed( )    '' true on Windows

'' Same rule as HasCreated: check before reading AccessedUtc

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Metadata

Clone this wiki locally