Node.js - bucket.file.exists()

Determine if a file exists in a bucket.

This API method is available from Release v0.16.0 and later.
import { bucket } from '@nitric/sdk'
const assets = bucket('assets').for('reading')
const exists = await assets.file('images/logo.png').exists()

Examples

Determine if a file exists

import { bucket } from '@nitric/sdk'
const assets = bucket('assets').for('reading')
const exists = await assets.file('images/logo.png').exists()

Have feedback on this page?

Open GitHub Issue
Last updated on Oct 7, 2025