mirror of
https://gitcode.com/gh_mirrors/es/esp32-opencv.git
synced 2025-08-06 18:24:38 +08:00
directories functions header added (from esp-idf/components/vfs)
This commit is contained in:
@ -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)
|
||||
|
@ -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 "================================================================================"
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user