[LC++]Distinguishing between a file and a directory
k_tutorials at yahoo.com
Fri Jul 16 04:22:01 UTC 2004
Is there any other way to do this? Since calling stat
will result in the open operation slowing down
significantly (at least I think it would. Please
correct me if I am wrong on this).
--- Jack Lloyd <lloyd at acm.jhu.edu> wrote:
> Yes, because the argument to open(2) is the
> pathname, thus you can stat(2) it
> and see what kind of file it is.
> On Thu, Jul 15, 2004 at 11:16:42AM -0700, Krishna
> Monian wrote:
> > Hi All,
> > Is there any way to distinguish whether a file
> > opened is an ordinary file or a directory using
> > information passed to the open system call?
> > Thanks
> > Krishna
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> > http://promotions.yahoo.com/new_mail
> > _______________________________________________
> > This is the Linux C++ Programming List
> > :
> This is the Linux C++ Programming List
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
More information about the tuxCPProgramming