# Get the file name of the current file (/docs/guides/util/import-meta-file)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 84 · updated: 2026-07-28 -->
Related: [Upgrade Bun to the latest version](/docs/guides/util/upgrade.md), [Detect when code is executed with Bun](/docs/guides/util/detect-bun.md), [Get the current Bun version](/docs/guides/util/version.md), [Hash a password](/docs/guides/util/hash-a-password.md), [Generate a UUID](/docs/guides/util/javascript-uuid.md), [Encode and decode base64 data](/docs/guides/util/base64.md)

Bun provides a handful of module-specific utilities on the [`import.meta`](/runtime/module-resolution#import-meta) object. Use `import.meta.file` to retrieve the name of the current file.

```ts /a/b/c.ts icon="/icons/typescript.svg"
import.meta.file; // => "c.ts"
```

***

See [`import.meta`](/runtime/module-resolution#import-meta).
