Accessing iOS files from C

Hello everybody,

I have the following problem. In my iOS app I have some C functions.
Some of them should access to Documents directory or to some file in MainBundle.

In detail the C function “access(filename,R_OK)” is = NO if it tries to test an existing file in Documents directory or a file in MainBundle. How can I solve this problem?

Many thanks in advance and regards,