# @tybys/windows-file-version-info

> C# FileVersionInfo class

Latest version **1.0.5** (published 2022-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tybys/windows-file-version-info
pnpm add @tybys/windows-file-version-info
yarn add @tybys/windows-file-version-info
bun add @tybys/windows-file-version-info
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-04-18 |
| First published | 2022-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 2 |
| Author | toyobayashi |
| Maintainers | toyobayashi |

## Links

- npm: https://www.npmjs.com/package/@tybys/windows-file-version-info
- Repository: https://github.com/toyobayashi/windows-file-version-info
- Homepage: https://github.com/toyobayashi/windows-file-version-info#readme
- Issues: https://github.com/toyobayashi/windows-file-version-info/issues
- npm.io page: https://npm.io/package/@tybys/windows-file-version-info

## Recent versions

- 1.0.5 (latest) — 2022-04-18
- 1.0.4 — 2022-04-17
- 1.0.3 — 2022-04-17
- 1.0.2 — 2022-04-17
- 1.0.1 — 2022-04-17
- 1.0.0 — 2022-04-17

## README

# windows-file-version-info

This package works on Windows only.

[FileVersionInfo MSDN](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.fileversioninfo)

## Usage

```js
const { FileVersionInfo } = require('@tybys/windows-file-version-info')

const info = FileVersionInfo.getVersionInfo('C:\\path\\to\\exe\\or\\dll')
console.log(info.fileDescription)
console.log(info.fileVersion)
console.log(info.toString())
console.log(JSON.stringify(info, null, 2))
```

## API

```ts
export declare interface IFileVersionInfo {
  readonly comments: string
  readonly companyName: string
  readonly fileBuildPart: number
  readonly fileDescription: string
  readonly fileMajorPart: number
  readonly fileMinorPart: number
  readonly fileName: string
  readonly filePrivatePart: string
  readonly fileVersion: string
  readonly internalName: string
  readonly isDebug: boolean
  readonly isPatched: boolean
  readonly isPreRelease: boolean
  readonly isPrivateBuild: boolean
  readonly isSpecialBuild: boolean
  readonly language: string
  readonly legalCopyright: string
  readonly legalTrademarks: string
  readonly originalFilename: string
  readonly privateBuild: string
  readonly productBuildPart: number
  readonly productMajorPart: number
  readonly productMinorPart: number
  readonly productName: string
  readonly productPrivatePart: number
  readonly productVersion: string
  readonly specialBuild: string
}

export declare class FileVersionInfo implements IFileVersionInfo {
  /* ...from IFileVersionInfo... */

  private constructor (external: object)
  toString (): string
  toJSON (): IFileVersionInfo
  static getVersionInfo (fileName: string): FileVersionInfo
}
```

---
_Source: https://npm.io/package/@tybys/windows-file-version-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
