Added VFS_ReadDir and SYS_READDIR, Implemented basic directory listing in CLIShell
[tpg/acess2.git] / Kernel / include / vfs_ext.h
1 /*
2  * Acess 2
3  * vfs_ext.h
4  * - Exported Symbols from the VFS
5  */
6 #ifndef _VFS_EXT_H
7 #define _VFS_EXT_H
8
9 // === CONSTANTS ===
10 #define VFS_MEMPATH_SIZE        (3 + (BITS/8)*2)
11 #define VFS_OPENFLAG_EXEC       0x01
12 #define VFS_OPENFLAG_READ       0x02
13 #define VFS_OPENFLAG_WRITE      0x04
14 #define VFS_OPENFLAG_NOLINK     0x40
15 #define VFS_OPENFLAG_USER       0x80
16 #define VFS_KERNEL_FLAG 0x40000000
17
18 #define SEEK_SET        1
19 #define SEEK_CUR        0
20 #define SEEK_END        -1
21
22 // === FUNCTIONS ===
23 extern int      VFS_Init();
24
25 extern int      VFS_Open(char *Path, Uint Flags);
26 extern void     VFS_Close(int FD);
27
28 extern int      VFS_Seek(int FD, Sint64 Offset, int Direction);
29 extern Uint64   VFS_Tell(int FD);
30
31 extern Uint64   VFS_Read(int FD, Uint64 Length, void *Buffer);
32 extern Uint64   VFS_Write(int FD, Uint64 Length, void *Buffer);
33
34 extern Uint64   VFS_ReadAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer);
35 extern Uint64   VFS_WriteAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer);
36
37 extern int      VFS_IOCtl(int FD, int ID, void *Buffer);
38
39 extern void     VFS_GetMemPath(void *Base, Uint Length, char *Dest);
40 extern char     *VFS_GetTruePath(char *Path);
41
42 extern int      VFS_Mount(char *Device, char *MountPoint, char *Filesystem, char *Options);
43 extern int      VFS_MkDir(char *Path);
44 extern int      VFS_Symlink(char *Link, char *Dest);
45 extern int      VFS_ReadDir(int FD, char *Dest);
46
47 #endif

UCC git Repository :: git.ucc.asn.au