Re: What's the equivalent of readdirat()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob Landley writes:

I'm moving some code to use openat() and friends, but there doesn't appear to be a readdirat().

The problem is that readdir(3) takes a path from cwd.

No, it doesn't. readdir() takes an existing DIR pointer, that was previously returned by opendir(3).

You will note that the opendir(3) man page also described an alternative fdopendir() function, which in conjunction with openat(3) will do what you want.

Attachment: pgpqtRaiLVb0t.pgp
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux