Skip to content

Modern Fs DirEntry Path

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Filesystem › Filesystem Library › DirEntry.Path

DirEntry.Path

Returns the entry's full path, ready to open.

Syntax

DirEntry.Path( )

Notes

  • the full path, directly usable

Examples

#import "std/fs"
using fs

dim td as FsResultUStr = CreateTempDir( "fbdoc" )
dim as ustring dir_ = td.Value( )
WriteAllText( PathJoin( dir_, "a.txt" ), "aaa" )
WriteAllText( PathJoin( dir_, "b.txt" ), "bb" )
CreateDir( PathJoin( dir_, "sub" ) )
WriteAllText( PathJoin( dir_, "sub", "c.txt" ), "c" )

'' The FULL path, directly usable -- no joining needed at the call site
for each r in ReadDir( dir_ )
    if r.IsOk( ) then
        if r.Value( ).IsFile( ) then
            print ReadAllText( r.Value( ).Path( ) ).IsOk( )       '' true
        end if
    end if
next

RemoveDirAll( dir_ )

Library: Filesystem Library
Category: Filesystem
Documented under: Directories

Clone this wiki locally