BSD Ports

devel/hs-atomic-write 0.2.1.0nb3 NetBSD

Atomically write to a file

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
mit
Categories
devel
Package size
88.8 KiB, 881.4 KiB installed

Description

Atomically write to a file on POSIX-compliant systems while preserving permissions.

On most Unix systems, mv is an atomic operation. This makes it simple to write to a file atomically just by using the mv operation. However, this will destroy the permissions on the original file. This library does the following to preserve permissions while atomically writing to a file:

* If an original file exists, take those permissions and apply them to the temp file before mving the file into place.

* If the original file does not exist, create a following with default permissions (based on the currently-active umask).

This way, when the file is mv'ed into place, the permissions will be the ones held by the original file.

Install

Binary package:

pkgin install hs-atomic-write

From pkgsrc:

cd /usr/pkgsrc/devel/hs-atomic-write && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_640.2.1.0nb3
NetBSD 10.1 aarch640.2.1.0nb3
SmartOS / illumos x86_640.2.1.0nb3
macOS 15 arm640.2.1.0nb3

Dependencies

Run dependencies 3
Required by 1