mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 09:59:52 +03:00
31 lines
502 B
C
31 lines
502 B
C
|
#ifndef FILESYSTEM_H
|
||
|
#define FILESYSTEM_H
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
|
||
|
#include <tinydir.h>
|
||
|
|
||
|
#define MAX_PATH_LENGTH _TINYDIR_PATH_MAX
|
||
|
|
||
|
typedef struct ENTRY
|
||
|
{
|
||
|
bool IsDir;
|
||
|
char Path[MAX_PATH_LENGTH];
|
||
|
} ENTRY;
|
||
|
|
||
|
typedef struct ENTRIES
|
||
|
{
|
||
|
size_t Num;
|
||
|
ENTRY *List;
|
||
|
} ENTRIES;
|
||
|
|
||
|
ENTRIES *EnumEntries(const char *path);
|
||
|
ENTRIES *EnumEntriesRecursively(const char *path, const bool files_only);
|
||
|
void FreeEntries(ENTRIES *entries);
|
||
|
|
||
|
#ifndef OS_WINDOWS
|
||
|
bool IsWindowsExtension(const char *extension);
|
||
|
#endif
|
||
|
|
||
|
#endif
|