Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BLI_fileops_types.h « blenlib « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f70237de3bcc044dfbab6acfc52629518ff0d34 (plain)
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
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright 2001-2002 NaN Holding BV. All rights reserved. */

#pragma once

/** \file
 * \ingroup bli
 * \brief Some types for dealing with directories.
 */

#include <sys/stat.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(WIN32)
typedef unsigned int mode_t;
#endif

#define FILELIST_DIRENTRY_SIZE_LEN 16
#define FILELIST_DIRENTRY_MODE_LEN 4
#define FILELIST_DIRENTRY_OWNER_LEN 16
#define FILELIST_DIRENTRY_TIME_LEN 8
#define FILELIST_DIRENTRY_DATE_LEN 16

struct direntry {
  mode_t type;
  const char *relname;
  const char *path;
#ifdef WIN32 /* keep in sync with the definition of BLI_stat_t in BLI_fileops.h */
#  if defined(_MSC_VER)
  struct _stat64 s;
#  else
  struct _stat s;
#  endif
#else
  struct stat s;
#endif
};

struct dirlink {
  struct dirlink *next, *prev;
  char *name;
};

#ifdef __cplusplus
}
#endif