Skip to content

Modern Fs OpenOptionsAppend

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

Home › Filesystem › File Streams › OpenOptionsAppend

OpenOptionsAppend

Returns the OpenOptions for adding to the end of a file, creating it if needed.

Syntax

OpenOptionsAppend( )

Notes

  • Append + Create: every write lands at the end, atomically per write.

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.Open( p, OpenOptionsAppend( ) )
f.WriteUtf8( "one " )
f.WriteUtf8( "two" )
f.Close( )
print ReadAllText( p ).Value( )    '' one two

RemoveDirAll( dir_ )

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

Clone this wiki locally