def touch(fpath, mode=<NUM_LIT>, dir_fd=None, verbose=<NUM_LIT:0>, **kwargs):
if verbose:<EOL><INDENT>print('<STR_LIT>'.format(fpath))<EOL><DEDENT>if six.PY2:  <EOL><INDENT>with open(fpath, '<STR_LIT:a>'):<EOL><INDENT>os.utime(fpath, None)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>flags = os.O_CREAT | os.O_APPEND<EOL>with os.fdopen(os.open(fpath, flags=flags, mode=mode, dir_fd=dir_fd)) as f:<EOL><INDENT>os.utime(f.fileno() if os.utime in os.supports_fd else fpath,<EOL>dir_fd=None if os.supports_fd else dir_fd, **kwargs)<EOL><DEDENT><DEDENT>return fpath<EOL>
change file timestamps

Works like the touch unix utility

Args:
    fpath (PathLike): name of the file
    mode (int): file permissions (python3 and unix only)
    dir_fd (file): optional directory file descriptor. If specified, fpath
        is interpreted as relative to this descriptor (python 3 only).
    verbose (int): verbosity
    **kwargs : extra args passed to `os.utime` (python 3 only).

Returns:
    PathLike: path to the file

References:
    https://stackoverflow.com/questions/1158076/implement-touch-using-python

Example:
    >>> import ubelt as ub
    >>> dpath = ub.ensure_app_cache_dir('ubelt')
    >>> fpath = join(dpath, 'touch_file')
    >>> assert not exists(fpath)
    >>> ub.touch(fpath)
    >>> assert exists(fpath)
    >>> os.unlink(fpath)