Skip to content

Modern Fs OpenOptionsRead

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

Home › Filesystem › File Streams › OpenOptionsRead

OpenOptionsRead

Returns the OpenOptions for reading a file that must already exist.

Syntax

OpenOptionsRead( )

Notes

  • Read only, the file must exist.

Examples

#import "std/fs"
using fs

dim as ustring dir_ = CreateTempDir( "tkdoc" ).Value( )
dim as ustring p = PathJoin( dir_, "f.txt" )
WriteAllText( p, "x" )
dim as File f
print f.Open( p, OpenOptionsRead( ) ).IsOk( )    '' true
f.Close( )

RemoveDirAll( dir_ )

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

Clone this wiki locally