def _touch(fname, mode=<NUM_LIT>, dir_fd=None, **kwargs):
flags = os.O_CREAT | os.O_APPEND<EOL>with os.fdopen(os.open(fname, flags=flags, mode=mode, dir_fd=dir_fd)) as f:<EOL><INDENT>os.utime(<EOL>f.fileno() if os.utime in os.supports_fd else fname,<EOL>dir_fd=None if os.supports_fd else dir_fd,<EOL>**kwargs,<EOL>)<EOL><DEDENT>
Touch a file.

    Credits to <https://stackoverflow.com/a/1160227>.