UNPKG

@sanity/cli

Version:

Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets

15 lines (12 loc) 257 B
import fs from 'node:fs/promises' export async function pathExists(filePath: string): Promise<boolean> { try { await fs.access(filePath) return true } catch (err) { if (err.code === 'ENOENT') { return false } throw err } }