Re: [cap-talk] File API taming
Kevin Reid <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Apr 10, 2009, at 1:56, Stiegler, Marc D wrote: > The thing I have occasionally found myself wishing I had, which > might be a good convenience method (though you can live without it), > is getParent(root, file), which would give you the parent of "file" > if that parent were in the subtree below "root". Without introducing any new concepts, we can write (root :File).optUnget(file), which would return the path of the file relative to that root, if files implemented optUnget/1. However, to implement getParent in terms of that, you would need to manipulate the returned pathname string. -- Kevin Reid <http://homepage.mac.com/kpreid/>