1 | #ifndef MTOOLS_DIRENTRY_H
|
---|
2 | #define MTOOLS_DIRENTRY_H
|
---|
3 |
|
---|
4 | #include "sysincludes.h"
|
---|
5 | #include "vfat.h"
|
---|
6 |
|
---|
7 | typedef struct direntry_t {
|
---|
8 | struct Stream_t *Dir;
|
---|
9 | /* struct direntry_t *parent; parent level */
|
---|
10 | int entry; /* slot in parent directory (-3 if root) */
|
---|
11 | struct directory dir; /* descriptor in parent directory (random if
|
---|
12 | * root)*/
|
---|
13 | char name[MAX_VNAMELEN+1]; /* name in its parent directory, or
|
---|
14 | * NULL if root */
|
---|
15 | int beginSlot; /* begin and end slot, for delete */
|
---|
16 | int endSlot;
|
---|
17 | } direntry_t;
|
---|
18 |
|
---|
19 | #include "stream.h"
|
---|
20 |
|
---|
21 | int vfat_lookup(direntry_t *entry, const char *filename, int length,
|
---|
22 | int flags, char *shortname, char *longname);
|
---|
23 |
|
---|
24 | struct directory *dir_read(direntry_t *entry, int *error);
|
---|
25 |
|
---|
26 | void initializeDirentry(direntry_t *entry, struct Stream_t *Dir);
|
---|
27 | int isNotFound(direntry_t *entry);
|
---|
28 | direntry_t *getParent(direntry_t *entry);
|
---|
29 | void dir_write(direntry_t *entry);
|
---|
30 | void low_level_dir_write(direntry_t *entry);
|
---|
31 | int fatFreeWithDirentry(direntry_t *entry);
|
---|
32 | int labelit(char *dosname,
|
---|
33 | char *longname,
|
---|
34 | void *arg0,
|
---|
35 | direntry_t *entry);
|
---|
36 | int isSubdirOf(Stream_t *inside, Stream_t *outside);
|
---|
37 | char *getPwd(direntry_t *entry);
|
---|
38 | void fprintPwd(FILE *f, direntry_t *entry, int escape);
|
---|
39 | int write_vfat(Stream_t *, char *, char *, int, direntry_t *);
|
---|
40 | #endif
|
---|