On Thu, 9 Jul 2009, Mark J. Reed wrote:
A few months ago (or maybe more) I proposed making pathnames their own
type, distinct from (or perhas a subclass of) strings, but easily
constructed from strings, maybe with an operator. Having those 29
single-letter methods on such a class would not bug me as much as
having them on Str.
See S32/IO document for a rough outline I did of this some time ago.
Feel free to hack away at it. Note that the documentation is spread across
- IO::FSNode
- IO::FileNode (does IO::FSNode)
- IO::DirectoryNode (does IO::FSNode)
- IO::LinkNode (does IO::FSNode)
There's also an IO::FSNodeACL class for handling permissions, but
that's only if you actually *want* to use these; the Unix ones are still there
too.
I got part way through speccing this, and then was told that my idea
for Tree-related classes couldn't be part of the core, and so I'd have to
monkey-patch them on afterwards; at that point, I went back to working on
Tree, and left the Filesystem stuff alone.
(Tree-related classes could be a role composed into both filesystem
node classes, and Match thingies returned by grammars, but alas,
monkey-patching will be necessary :) ).
:)
---------------------------------------------------------------------
| Name: Tim Nelson | Because the Creator is, |
| E-mail: wayl...@wayland.id.au | I am |
---------------------------------------------------------------------
----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V-
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----