Skip to content

Modern Fs FileInfo Created

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

Home › Filesystem › Filesystem Library › FileInfo.Created

FileInfo.Created

Returns the creation time as a chrono.Instant; check HasCreated first.

Syntax

FileInfo.Created( )

Notes

  • The creation (birth) time as a chrono.Instant -- meaningful only when HasCreated( ).

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( )
if fi.HasCreated( ) then print cbool( fi.Created( ).Ticks = fi.CreatedUtc( ) )    '' true

RemoveDirAll( dir_ )

Library: Filesystem Library Category: Filesystem Documented under: Metadata

Clone this wiki locally