Thread: Getting back to the top of the directory

  1. #1
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382

    Getting back to the top of the directory

    When I use the readdir command to read directory entries into my program, what do I do when I've read the last directory and readdir () returns NULL? What I want to do is return to the top of the directory so the readdir () calls will start returning directory entries from the directory again. How can this be done?

  2. #2
    Registered User alex's Avatar
    Join Date
    Sep 2001
    Posts
    132
    rewinddir(dir);

    alex

  3. #3
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382
    Thank you very much!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  2. how to make opengl draw in lighter colors ?
    By jabka in forum Game Programming
    Replies: 2
    Last Post: 12-17-2007, 06:12 AM
  3. Directory crawler problems
    By mart_man00 in forum C Programming
    Replies: 31
    Last Post: 08-17-2003, 09:33 PM
  4. phone book directory 2
    By arangawawa in forum C Programming
    Replies: 4
    Last Post: 08-01-2003, 05:32 PM
  5. Replies: 6
    Last Post: 07-30-2003, 03:08 AM