[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getFileMetadata](./bitburner.ns.getfilemetadata.md) ## NS.getFileMetadata() method Get the metadata of a file. **Signature:** ```typescript getFileMetadata(filename: string): FileMetadata; ``` ## Parameters
| Parameter | Type | Description |
|---|---|---|
| filename | string | Name of the file to read the metadata from. It must be a text file (.txt, .json, .css) or a script (.js, .jsx, .ts, .tsx). |