EFFS

Discussion to talk about software related topics only.
Post Reply
talexander
Posts: 21
Joined: Fri Apr 25, 2008 10:17 am

EFFS

Post by talexander »

Is there an EFFS function call to check if a file is open? I haven't seen any in the documentation. It seems like the only way to check is by error codes.
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: EFFS

Post by lgitlitz »

I believe the easiest way to find if a file is currently open is to try and open it and check the return value. If you do not want to open a file and only want to see if it is open then you can use the function:
long f_tell(F_FILE* filehandle);
This will return the current position of an open file. If there is an error, such as the file no being open, it will return -1. You can then use f_getlasterror() to see the actual error code that occurred.

-Larry
Post Reply