Files
bitburner-src/markdown/bitburner.ns.getfilemetadata.md
T
2025-06-16 16:34:06 -07:00

33 lines
768 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [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) or a script (.js, .jsx, .ts, .tsx). |
**Returns:**
[FileMetadata](./bitburner.filemetadata.md)
The metadata of the file.
## Remarks
RAM cost: 0 GB
This function returns the metadata associated with the specified file.