POSIX functions with spiffs works wrong? ("access" doest work)
Posted: Thu Mar 07, 2019 3:38 pm
Hi, I'm using spiffs and I have created binary file.
I need check file existance.
When I'm cheking with
it works. But it takes about 300-400 ms to do this check for some reason
So I want to try different - access function.
This always give me that file doesnt exist. Also I tried add check with (F_OK | X_OK) params, but same.
Any ideas why it happens?
P.S. File size is not big - about 4-8 bytes.
I need check file existance.
When I'm cheking with
Code: Select all
fopen(path, "rb") != NULL
{
// file exist
}
So I want to try different - access function.
Code: Select all
if ( access(path, (F_OK) != -1 )
{
// file exist
}
else
{
// no file
}
Any ideas why it happens?
P.S. File size is not big - about 4-8 bytes.