Re: testing for directory

2007-04-29 Thread Roland Smith
On Sun, Apr 29, 2007 at 04:39:42PM -0400, Robert Huff wrote: In C code, is there a quick and dirty way to tell if a path points to a directory? Or do I have to open the parent directory and check the entry for that name? Try opening the path in question for writing with open(2). If it

Re: testing for directory

2007-04-29 Thread Don Hinton
On Sunday 29 April 2007 15:58:48 Roland Smith wrote: On Sun, Apr 29, 2007 at 04:39:42PM -0400, Robert Huff wrote: In C code, is there a quick and dirty way to tell if a path points to a directory? Or do I have to open the parent directory and check the entry for that name? Just open()

Re: testing for directory

2007-04-29 Thread Jeffrey Goldberg
On Apr 29, 2007, at 3:39 PM, Robert Huff wrote: In C code, is there a quick and dirty way to tell if a path points to a directory? man 2 stat Cheers, -j -- Jeffrey Goldberghttp://www.goldmark.org/jeff/ ___

Re: testing for directory

2007-04-29 Thread Robert Huff
Jeffrey Goldberg writes: In C code, is there a quick and dirty way to tell if a path points to a directory? man 2 stat This, I believe, will be the answer I'm looking for. Thank you. Robert Huff