@Override
	public T write(T buf) throws EmuIOException {
		checkWritable();
		if (flags.contains(OpenFlag.O_APPEND)) {
			offset = arithmetic.fromConst(file.getStat().st_size, offsetBytes);
		}
		T len = file.write(arithmetic, offset, buf);
		advanceOffset(len);
		return len;
	}
Advance the handle's offset (negative to rewind)

@param len the number of bytes to advance
Ghidra/Features/SystemEmulation/src/main/java/ghidra/pcode/emu/unix/DefaultEmuUnixFileHandle.java