Skip to content

Modern Fs FileInfo Accessed

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

Home › Filesystem › Filesystem Library › FileInfo.Accessed

FileInfo.Accessed

Returns the last-access time as a chrono.Instant; often not kept up to date.

Syntax

FileInfo.Accessed( )

Notes

  • The last-access time as a chrono.Instant -- meaningful only when HasAccessed( ), and often not updated at all (relatime, NTFS defaults).

Examples

#import "std/fs"
#import "std/chrono"
using fs

dim as ustring dir_ = CreateTempDir( "tkdoc" ).Value( )
dim as ustring p = PathJoin( dir_, "f.txt" )
WriteAllText( p, "x" )
dim as FileInfo fi = Stat( p ).Value( )
print cbool( fi.Accessed( ).Ticks = fi.AccessedUtc( ) )    '' true

RemoveDirAll( dir_ )

Library: Filesystem Library Category: Filesystem Documented under: Metadata

Clone this wiki locally