mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
63 lines
879 B
Markdown
63 lines
879 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[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
|
|
|
|
<table><thead><tr><th>
|
|
|
|
Parameter
|
|
|
|
|
|
</th><th>
|
|
|
|
Type
|
|
|
|
|
|
</th><th>
|
|
|
|
Description
|
|
|
|
|
|
</th></tr></thead>
|
|
<tbody><tr><td>
|
|
|
|
filename
|
|
|
|
|
|
</td><td>
|
|
|
|
string
|
|
|
|
|
|
</td><td>
|
|
|
|
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).
|
|
|
|
|
|
</td></tr>
|
|
</tbody></table>
|
|
|
|
**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.
|
|
|