Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Jack-Barry/get-file-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

Gets file metadata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published