Skip to content

Modern Fs OpenOptionsWrite

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

Home › Filesystem › File Streams › OpenOptionsWrite

OpenOptionsWrite

Returns the OpenOptions for writing a new file or an existing one emptied.

Syntax

OpenOptionsWrite( )

Notes

  • Write + Create + Truncate: a new, empty file, or an existing one emptied.

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
print f.Open( p, OpenOptionsWrite( ) ).IsOk( )    '' true
f.Close( )

RemoveDirAll( dir_ )

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

Clone this wiki locally