[**packwizjs**](../../README.md) *** [packwizjs](../../modules.md) / [parser](../README.md) / IndexFileEntry # Class: IndexFileEntry Defined in: parser.ts:29 Represents a file entry in the Packwiz index. ## Constructors ### new IndexFileEntry() > **new IndexFileEntry**(`file`, `hash`, `hashFormat`, `alias`?, `metafile`?, `preserve`?): [`IndexFileEntry`](IndexFileEntry.md) Defined in: parser.ts:39 Creates a new IndexFileEntry instance. #### Parameters ##### file [`Resource`](../../resource/classes/Resource.md) The Resource instance representing the file. ##### hash `string` The hash of the file. ##### hashFormat [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md) The format of the hash. ##### alias? `string` An optional alias for the file that will be downloaded by this file. ##### metafile? `boolean` = `false` Whether the file is a metafile. ##### preserve? `boolean` = `false` Whether to preserve the file downloaded by this file if it is modified by an end user. #### Returns [`IndexFileEntry`](IndexFileEntry.md) ## Properties ### alias? > `readonly` `optional` **alias**: `string` Defined in: parser.ts:43 An optional alias for the file that will be downloaded by this file. *** ### file > `readonly` **file**: [`Resource`](../../resource/classes/Resource.md) Defined in: parser.ts:40 The Resource instance representing the file. *** ### hash > `readonly` **hash**: `string` Defined in: parser.ts:41 The hash of the file. *** ### hashFormat > `readonly` **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md) Defined in: parser.ts:42 The format of the hash. *** ### metafile > `readonly` **metafile**: `boolean` = `false` Defined in: parser.ts:44 Whether the file is a metafile. *** ### preserve > `readonly` **preserve**: `boolean` = `false` Defined in: parser.ts:45 Whether to preserve the file downloaded by this file if it is modified by an end user. ## Methods ### parse() > **parse**(): `Promise`\<[`Metafile`](../interfaces/Metafile.md)\> Defined in: parser.ts:59 Parses the TOML file and returns its contents. #### Returns `Promise`\<[`Metafile`](../interfaces/Metafile.md)\> The parsed file as a structured object.