npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

file-uti

3.0.1

@sindresorhus

npmHomeRepoSnykSocket
Downloads:26
$ npm install file-uti
DailyWeeklyMonthlyYearly

file-uti

Get the UTI (Uniform Type Identifier) of a file on macOS

Install

$ npm install file-uti

Usage

import {fileUti} from 'file-uti';

console.log(await fileUti('index.js'));
//=> 'com.netscape.javascript-source'

API

fileUti(filePath)

Returns a Promise<string> with the UTI.

fileUtiSync(filePath)

Returns a string with the UTI.

Related

  • uti-cli - CLI for this module
  • file-metadata - Get file metadata using mdls on macOS