opendir(), readdir()

This is a discussion on opendir(), readdir() within the C++ Programming forums, part of the General Programming Boards category; Just wondering if anyone knows how to use these functions well... I'm attempting to open a directory, and read every ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    80

    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 readdir....no idea about that)

    Any thoughts?

    Thanks!

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    80
    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.

    Thanks

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, 01:16 PM
  2. opendir failure
    By MK27 in forum C Programming
    Replies: 5
    Last Post: 07-10-2008, 04:47 PM
  3. accessing all files in a folder.
    By pastitprogram in forum C++ Programming
    Replies: 15
    Last Post: 04-30-2008, 11:56 AM
  4. php: glob() vs opendir() and friends
    By MisterSako in forum Tech Board
    Replies: 1
    Last Post: 03-16-2006, 01:42 AM
  5. readdir() equivalent for Windows?
    By C Seņor in forum Windows Programming
    Replies: 0
    Last Post: 04-19-2002, 01:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21