3 * By John Hodge (thePowersGang)
4 * This file is published under the terms of the Acess licence. See the
5 * file COPYING for details.
7 * common.h - Common Types and Definitions
9 #ifndef _NTFS__COMMON_H_
10 #define _NTFS__COMMON_H_
16 typedef struct sNTFS_File tNTFS_File;
17 typedef struct sNTFS_Directory tNTFS_Directory;
18 typedef struct sNTFS_Disk tNTFS_Disk;
19 typedef struct sNTFS_Attrib tNTFS_Attrib;
20 typedef struct sNTFS_AttribDataRun tNTFS_AttribDataRun;
30 struct sNTFS_Directory
33 tNTFS_Attrib *I30Root;
34 tNTFS_Attrib *I30Allocation;
38 * In-memory representation of an NTFS Disk
50 tNTFS_Attrib *MFTDataAttr;
51 tNTFS_Attrib *MFTBitmapAttr;
53 tNTFS_Directory RootDir;
56 struct sNTFS_AttribDataRun
76 int CompressionUnitL2Size; // 0 = uncompressed
77 Uint64 FirstPopulatedCluster;
78 tNTFS_AttribDataRun *Runs;
83 // -- MFT Access / Manipulation
84 extern tNTFS_Attrib *NTFS_GetAttrib(tNTFS_Disk *Disk, Uint32 MFTEntry, int Type, const char *Name, int DesIdx);
85 extern size_t NTFS_ReadAttribData(tNTFS_Attrib *Attrib, Uint64 Offset, size_t Length, void *Buffer);
87 extern int NTFS_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]);
88 extern tVFS_Node *NTFS_FindDir(tVFS_Node *Node, const char *Name, Uint Flags);