| err = ESUCCESS, err0 = err1, f = fs[fh.fid], fh = ofh[fd], n0 = n1, root.dir?, fids-cons(root, fs, ofh), pre-write(fd, buf, n0, err, user, root, fs, ofh), fh.fid ∈ fs, fd ∈ ofh, n1 ≤ # buf, n ≤ n0 ⊦ ⟪ofh[fd].pos := fh.pos + n; psynced := ?⟫ fids-cons(root, fs[fh.fid, f.content:= splice(buf, 0, f.content, fh.pos, n)], ofh) |
err = ESUCCESS, err0 = err1, f = fs[fh.fid], fh = ofh[fd], n0 = n1, root.dir?, fids-cons(root, fs, ofh), pre-write(fd, buf, n0, err, user, root, fs, ofh), fd ∈ ofh, fh.fid ∈ fs, n ≤ n0, n1 ≤ # buf ⊦ ⟪psynced := ?⟫ fids-cons(root, fs[fh.fid, f.content:= splice(buf, 0, f.content, fh.pos, n)], ofh[fd, ofh[fd].pos:= (fh.pos + n)])