axle OS
x86_32 UNIX-like hobby OS
fs_file_internal.h
1 #ifndef FS_FILE_INTERNAL
2 #define FS_FILE_INTERNAL
3 
4 #include "fs_file.h"
5 
6 struct fs_file {
7  fs_file * parent;
8  char * name;
9  off_t size;
10  unsigned long long offset;
11  union {
12  struct {
13  int count;
14  fs_file * * subfiles;
15  };
16  struct {
17  int unused;
18  void * data;
19  };
20  };
21 };
22 
23 typedef struct fs_file fs_file;
24 
25 fs_file * root_fs_file;
26 
27 char * fs_popFileName(char * path, int8_t * offset);
28 fs_file * fs_finddir(fs_file * file, char * path);
29 int fs_countdir(fs_file * file);
30 void fs_enumerateFile(fs_file * file, void (*f)(int, fs_file *, char *));
31 
32 #endif /* FS_FILE_INTERNAL */
Definition: fs_file_internal.h:6
Definition: size.h:4