def write_quota(outbytes: int, outfn: Path) -> Union[None, int]:
if not outfn:<EOL><INDENT>return None<EOL><DEDENT>anch = Path(outfn).resolve().anchor<EOL>freeout = shutil.disk_usage(anch).free<EOL>if freeout < <NUM_LIT:10> * outbytes:<EOL><INDENT>raise IOError(f'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>return freeout<EOL>
aborts writing if not enough space on drive to write