Skip to content

Modern Fs File Size

Paul Squires edited this page Oct 22, 2026 · 3 revisions

Home › Filesystem › File Streams › File.Size

File.Size

Returns the open file's current size in bytes.

Syntax

File.Size( )

Notes

  • The size of the open file now.

Examples

#import "std/fs"
using fs

dim as ustring dir_ = CreateTempDir( "tkdoc" ).Value( )
dim as ustring p = PathJoin( dir_, "f.txt" )
dim as File f
f.Create( p )
f.WriteUtf8( "abc" )
print f.Size( ).Value( )    '' 3
f.Close( )

RemoveDirAll( dir_ )

Library: Filesystem Library Category: File Streams Documented under: Files

Clone this wiki locally