searching for a file in qnx...

Hi All,

Below are couple of questions regading file existence

  1. I want to search for a file in a particular directory - is there any function call i can directly use?
  2. For seeing whether a file exists or not in the system - I have thought couple of solutions a) use access(“filename”), b) use fopen() c) use find command from the program, is there a better way to do this other than the options mentioned???
  3. How do i get the created time of a file??? the stat structure doesnt provide me this info?

Please provide u r inputs…

regards

  1. for finding a file, out of source is find the solution, in the source you will have to run recursivle through the director(y/ies) and compare the name in the dirent structure
  2. for checking for an existent file, use (f)open (and the S_ISREG-Makro checking if it is a regular file, if needed)
  3. stat provides just this times:
    time_t st_mtime; /* Time of last data modification. /
    time_t st_atime; /
    Time when file data was last accessed./
    time_t st_ctime; /
    Time of last file status change. */