This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

get-file-properties
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

GetFileProperties

What is it?

Zero dependency tool for getting a file's properties/metadata.

Limitations

Currently only works on Windows, though I'm open to pull requests to add functionality for MacOS and Linux.

Usage

npm i get-file-properties
import { getFileProperties, WmicDataObject } from 'get-file-properties'
 
async function demo() {
  // Ensure you are using double backslashes in your file path
  const filepath: string = 'C:\\path\\to-my\\file.txt'
  let metadata: WmicDataObject
 
  metadata = await getFileProperties(filepath)
  console.log(metadata.FileSize)
}

Dependents (0)

Package Sidebar

Install

npm i get-file-properties

Weekly Downloads

22

Version

1.0.1

License

MIT

Unpacked Size

17.2 kB

Total Files

13

Last publish

Collaborators

  • jack-barry