-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile_queries.h
More file actions
53 lines (44 loc) · 814 Bytes
/
file_queries.h
File metadata and controls
53 lines (44 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include <time.h>
#include <string.h>
#include <stdint.h>
#define PATH_MAX_LENGTH 64
enum asset_diff_type
{
DIFF_Added,
DIFF_Modified,
DIFF_Deleted,
DIFF_EnumCount
};
struct path
{
char Name[PATH_MAX_LENGTH];
};
struct asset_diff
{
uint32_t Type;
path Path;
};
struct file_stat
{
time_t LastTimeModified;
};
namespace Platform
{
int32_t ReadPaths(asset_diff* DiffPaths, path* Paths, file_stat* Stats, int32_t MaxElementCount,
int32_t* ElementCount, const char* StartPath, const char* Extension);
}
inline int32_t
GetPathIndex(path* PathArray, int32_t PathCount, const char* Path)
{
int Index = -1;
for(int i = 0; i < PathCount; i++)
{
if(strcmp(PathArray[i].Name, Path) == 0)
{
Index = i;
break;
}
}
return Index;
}