directories functions header added (from esp-idf/components/vfs)

This commit is contained in:
Joachim Burket
2020-06-30 14:34:39 +02:00
parent 62d3b0d9b7
commit 865644b64e
3 changed files with 4 additions and 39 deletions

View File

@ -660,8 +660,7 @@ include(cmake/OpenCVModule.cmake)
# Detect endianness of build platform
# ----------------------------------------------------------------------------
# if not working while compiling for esp32, change the next line in 'if(IOS OR ESP32)'
if(IOS)
if(IOS OR ESP32)
# test_big_endian needs try_compile, which doesn't work for iOS
# http://public.kitware.com/Bug/view.php?id=12288
set(WORDS_BIGENDIAN 0)

View File

@ -67,7 +67,7 @@ cp $SCRIPTDIR/resources/alloc_fix.cpp ./3rdparty/ade/ade-0.1.1f/sources/ade/sour
echo "================================================================================"
echo "Compiling with make -j"
echo "================================================================================"
make -j
make -j3
### installing in output directory ###
echo "================================================================================"

View File

@ -133,44 +133,10 @@ namespace
}
#else
#if defined(ESP32)
#include <sys/unistd.h>
#include "esp_dirent.h"
#include <sys/stat.h>
const char dir_separators[] = "/";
namespace {
struct dirent {
const char *d_name;
};
struct DIR {
dirent ent;
DIR() { }
~DIR()
{
if (ent.d_name)
delete[] ent.d_name;
}
};
DIR* opendir(const char* path)
{
DIR* dir = new DIR;
dir->ent.d_name = 0;
// TODO implement (point the first file starting with 'path' in its name)
return dir;
}
dirent* readdir(DIR* dir)
{
// TODO: implement (point to the next file with 'path' in its name)
return &(dir->ent);
}
void closedir(DIR* dir)
{
delete dir;
}
}
#else
# include <dirent.h>
# include <sys/stat.h>