Help for fopen()

Kate Feng feng1 at bnl.gov
Tue Jul 31 19:12:31 UTC 2007


I must have missed some simple setup steps  that
fopen() does not seem to work anymore.

fopen("mydir/test.dat","w") returns error 2 : "/* No such file or
directory */"

even though it does exist.

fopen("test.dat","w") returns a file descriptor and
no error message.  However, "test.dat" does not exist.
Even if  "test.dat" exists and is world writable, it
does not seem to respond to the following


fprintf(fp, "test\n");
  fflush(fp);
  fsync(fileno(fp));
  fclose(fp);

The file still remains empty and  untouched.

Any  assistance is highly appreciated.

Regards,
Kate




More information about the users mailing list