This won't work with ZFS, as it may be impossible to delete a file on ZFS when disk is full. The equivalent in ZFS is to create an empty dataset with reserved space.
For me, it was possible to truncate -s 0 a large file on a full disk with ZFS.
A way to prevent this is to create a dataset and reserve n amount of space, typically 10-20% and set it read-only.. before the pool gets full. Then when the pool fills up, you can reduce the reservation to be able to clean up files.
Thanks, I've been wondering about the "proper" way of doing this in ZFS and this method hadn't come up in my searches.