Skip to Content
APIutimes

utimes

Set the access and modification times of a file (atime, mtime). Current Vooya FS inputs are numbers in seconds since the Unix epoch.

Basic usage

import { utimes } from '@vooya/fs' await utimes('./file.txt', atime, mtime)

Methods

utimes(path, atime, mtime)

Async. Returns Promise<void>.

ArgumentTypeDescription
pathstringFile path.
atimenumberAccess time (e.g. seconds since epoch).
mtimenumberModification time.

utimesSync(path, atime, mtime)

Sync. Same arguments; throws on error.

Performance

Single syscall; on par with Node.js. See Benchmarks.

Notes

  • Precision: Platform-dependent; same as Node.js.
  • Known gap: Missing-path errors currently have Node-like messages, but do not expose Node-style code, path, and syscall fields yet.
  • Unsupported Node inputs/APIs: Buffer paths, URL paths, Date time values, string time values, and file-descriptor futimes APIs are not part of the current Vooya FS utimes surface.

Competitor measurements

See the full utimes comparison table for Node 22/24, peer libraries, sync/Promise modes, small and batch workloads, execution routes and measurement limits.

Last updated on