EFFS
-
- Posts: 21
- Joined: Fri Apr 25, 2008 10:17 am
EFFS
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.
Re: EFFS
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
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