in reply to opendir a directory abstraction?

I assume that you would have to have some way to specify what file system the directory entries in your string are based on?   Or would you assume that they are the same as the root file system?

And what would the inode numbers point to?

Replies are listed 'Best First'.
Re^2: opendir a directory abstraction?
by LanX (Saint) on Feb 13, 2021 at 15:24 UTC
    > I assume that you would have to have some way to specify what file system the directory entries in your string are based on?

    No, rather a minimal abstraction of a file system.

    Kind of a nested data-structure like a AoA or HoH, not the full implementation.

    > And what would the inode numbers point to?

    nowhere? stat doesn't work on abstracted FH either, hence no "inode"

    DB<410> $str = join "\n", a..d DB<411> open AFH, "<",\$str DB<412> p "".<AFH> a DB<413> p "".<AFH> b DB<414> @stat = stat AFH DB<415> x @stat empty array DB<416>

    see also stat: "Not all fields are supported on all filesystem types."

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery