Skip to content

Modern Fs FileInfo OwnerUid

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

Home › Filesystem › Filesystem Library › FileInfo.OwnerUid

FileInfo.OwnerUid

Returns the owner's user id, or 0 unless HasOwner is true.

Syntax

FileInfo.OwnerUid( )

Notes

  • The owner's user id; 0 unless HasOwner( ).

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 iif( fi.HasOwner( ), "owned", "no owner here" )

RemoveDirAll( dir_ )

Library: Filesystem Library Category: Filesystem Documented under: Metadata

Clone this wiki locally