Skip to content

Modern Fs File Path

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

Home › Filesystem › File Streams › File.Path

File.Path

Returns the path the file was opened with.

Syntax

File.Path( )

Notes

  • The path as it was given to Open, or as OpenTemp made it.

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 )
print PathFileName( f.Path( ) )    '' f.txt
f.Close( )

RemoveDirAll( dir_ )

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

Clone this wiki locally