read directory contents

This is a discussion on read directory contents within the C Programming forums, part of the General Programming Boards category; hello folks, sorry for a newbie question: I am reading directory contents with opendir() and readdir(). everything is fine if ...

  1. #1
    Unregistered
    Guest

    read directory contents

    hello folks,

    sorry for a newbie question:

    I am reading directory contents with opendir() and readdir().
    everything is fine if I just need filenames. but what if I need creation dates, and size of the files?

    does dirent.h provide this?

    thanks!

  2. #2
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    Look up findfirst() and findnext() in DIR.H.

    Although they're neither ANSI nor POSIX, they do work.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    87
    Actually if ur programming in linux/unix do a "man stat" in a terminal u'll get all the relevant information you need there.
    PuterPaul.co.uk - Portfolio site

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    10
    thanks, people.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bytes lost with partial read in UDP
    By mynickmynick in forum Networking/Device Communication
    Replies: 3
    Last Post: 03-31-2009, 03:06 AM
  2. how can i read .RData contents in an executable file?
    By Masterx in forum C++ Programming
    Replies: 9
    Last Post: 03-30-2009, 10:07 AM
  3. Read and display contents from text file
    By spadez in forum C Programming
    Replies: 2
    Last Post: 02-03-2009, 03:25 PM
  4. Replies: 1
    Last Post: 07-24-2002, 07:33 AM
  5. Help! Can't read decimal number
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 09-07-2001, 03:09 AM

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