Thread: opendir(), readdir()

  1. #1
    Registered User
    Join Date
    Apr 2002

    opendir(), readdir()

    Just wondering if anyone knows how to use these functions well...

    I'm attempting to open a directory, and read every file in it, then close the directory, open the next one, read all its files, etc...

    Any documentation that I've been able to find is rather cryptic ( durint * return value for idea about that)

    Any thoughts?


  2. #2
    Registered User
    Join Date
    Apr 2002
    Ahhh! Thanks!

    Each call to readdir returns a dirent *, and I can get the file name from that struct with the d_name member....sounds good to me.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opendir() returns null but errno is zero
    By Elkvis in forum Linux Programming
    Replies: 2
    Last Post: 12-16-2008, 12:16 PM
  2. opendir failure
    By MK27 in forum C Programming
    Replies: 5
    Last Post: 07-10-2008, 03:47 PM
  3. accessing all files in a folder.
    By pastitprogram in forum C++ Programming
    Replies: 15
    Last Post: 04-30-2008, 10:56 AM
  4. php: glob() vs opendir() and friends
    By MisterSako in forum Tech Board
    Replies: 1
    Last Post: 03-16-2006, 12:42 AM
  5. readdir() equivalent for Windows?
    By C Seņor in forum Windows Programming
    Replies: 0
    Last Post: 04-19-2002, 12:57 PM
Website Security Test