OS.pmc patch to add 'ls'

2006-02-12 Thread Joshua Isom
I wrote up a quick patch to os.pmc to add an ls method. Pass it a directory name, and it'll return a resizablestringarray with the contents of the directory. But, I don't know anything about the windows API and can't test it, etc... I don't think there's been any decision yet on the interfac

Re: OS.pmc patch to add 'ls'

2006-02-12 Thread Alberto Simões
Leo, should I apply it for OS or File, or none? Cheers Alberto Joshua Isom wrote: I wrote up a quick patch to os.pmc to add an ls method. Pass it a directory name, and it'll return a resizablestringarray with the contents of the directory. But, I don't know anything about the windows API an

Re: OS.pmc patch to add 'ls'

2006-02-12 Thread Alberto Simões
Applied as r11511 (wow, a palindrome revision :-)) Thanks. Alberto Joshua Isom wrote: I wrote up a quick patch to os.pmc to add an ls method. Pass it a directory name, and it'll return a resizablestringarray with the contents of the directory. But, I don't know anything about the windows AP

Re: OS.pmc patch to add 'ls'

2006-02-12 Thread Leopold Toetsch
On Feb 12, 2006, at 21:13, Alberto Simões wrote: Applied as r11511 (wow, a palindrome revision :-)) And reverted in r11512 by ambs. The choosen method name isn't, well, the best choice, the used OS calls (opendir/readdir/closedir) should better be exposed as is, and it didn't compile, becau

Re: OS.pmc patch to add 'ls'

2006-02-12 Thread Joshua Hoblitt
On Mon, Feb 13, 2006 at 12:23:33AM +0100, Leopold Toetsch wrote: > > On Feb 12, 2006, at 21:13, Alberto Sim?es wrote: > > >Applied as r11511 (wow, a palindrome revision :-)) > > And reverted in r11512 by ambs. The choosen method name isn't, well, > the best choice, the used OS calls (opendir/re

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Chris Dolan
On Feb 12, 2006, at 6:52 PM, Joshua Hoblitt wrote: It would also be 'really nice' have a glob(3) like method that is implemented as a wrapper around *dir methods so the semantics are portable. My outsider opinion is that parrot should focus on exposing basic OS functions (opendir, readdir, c

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Joshua Hoblitt
On Mon, Feb 13, 2006 at 09:28:40AM -0600, Chris Dolan wrote: > On Feb 12, 2006, at 6:52 PM, Joshua Hoblitt wrote: > > >It would also be 'really nice' have a glob(3) like method that is > >implemented as a wrapper around *dir methods so the semantics are > >portable. > > My outsider opinion is tha

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Chris Dolan
On Feb 13, 2006, at 1:20 PM, Joshua Hoblitt wrote: On Mon, Feb 13, 2006 at 09:28:40AM -0600, Chris Dolan wrote: On Feb 12, 2006, at 6:52 PM, Joshua Hoblitt wrote: It would also be 'really nice' have a glob(3) like method that is implemented as a wrapper around *dir methods so the semantics ar

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Jonathan Worthington
"Joshua Hoblitt" <[EMAIL PROTECTED]> wrote: I think your slightly confusing OPs and PMCs. Presumably the *dir functionality would be implemented as OP codes I thought The Plan was to have all the I/O stuff done with PMCs rather than ops in the end. There's no real benefit in having ops - the

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Joshua Hoblitt
On Mon, Feb 13, 2006 at 08:09:45PM -, Jonathan Worthington wrote: > "Joshua Hoblitt" <[EMAIL PROTECTED]> wrote: > >I think your slightly confusing OPs and PMCs. Presumably the *dir > >functionality would be implemented as OP codes > > > I thought The Plan was to have all the I/O stuff done wit

Re: OS.pmc patch to add 'ls'

2006-02-13 Thread Joshua Isom
On Feb 13, 2006, at 6:28 PM, Joshua Hoblitt wrote: On Mon, Feb 13, 2006 at 08:09:45PM -, Jonathan Worthington wrote: I agree with Chris on minimising the amount of places we do security stuff as far as is sensible. However, I would think that the interface for doing sandboxing style stuf