Skip to content

Modern Fs FileInfo AccessedUtc

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

Home › Filesystem › Filesystem Library › FileInfo.AccessedUtc

FileInfo.AccessedUtc

Returns the last-access time in ticks, or 0 when HasAccessed is false.

Syntax

FileInfo.AccessedUtc( )

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

'' Guarded by HasAccessed, like CreatedUtc -- and worth less than it
'' looks: many systems mount with noatime, so it may never advance
if info.HasAccessed( ) then
    print info.AccessedUtc( ) > 0        '' -1 (true)
end if

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Metadata

Clone this wiki locally