# Path: ubelt/util_io.py
# def writeto(fpath, to_write, aslines=False, verbose=None):
# def _ensure_bytes(text):
# def readfrom(fpath, aslines=False, errors='replace', verbose=None):
# def touch(fpath, mode=0o666, dir_fd=None, verbose=0, **kwargs):
# def delete(path, verbose=False):
# 
# Path: ubelt/util_platform.py
# WIN32  = sys.platform == 'win32'  # type: bool
# LINUX  = sys.platform.startswith('linux')  # type: bool
# DARWIN = sys.platform == 'darwin'  # type: bool
# POSIX = 'posix' in sys.builtin_module_names  # type: bool
# def platform_data_dir():
# def platform_config_dir():
# def platform_cache_dir():
# def get_app_data_dir(appname, *args):
# def ensure_app_data_dir(appname, *args):
# def get_app_config_dir(appname, *args):
# def ensure_app_config_dir(appname, *args):
# def get_app_cache_dir(appname, *args):
# def ensure_app_cache_dir(appname, *args):
# def find_exe(name, multi=False, path=None):
# def find_path(name, path=None, exact=False):


from os.path import exists, islink, join, normpath
from ubelt import util_io
from ubelt import util_platform
    from ubelt import _win32_links
    from ubelt import util_colors
import os
import sys
import warnings
                print('... already exists, but its a file. This will error.')
            raise FileExistsError(
                'cannot overwrite a physical path: "{}"'.format(path))
        else:  # nocover
            if verbose:
                print('... already exists, and is either a file or hard link. '
                      'Assuming it is a hard link. '
                      'On non-win32 systems this would error.')

    if _win32_links is None:
        os.symlink(path, link)
    else:  # nocover
        _win32_links._symlink(path, link, overwrite=overwrite, verbose=verbose)

    return link


def _readlink(link):
    # Note:
    # https://docs.python.org/3/library/os.html#os.readlink
    # os.readlink was changed on win32 in version 3.8: Added support for
    # directory junctions, and changed to return the substitution path (which
    # typically includes \\?\ prefix) rather than the optional “print name”
    # field that was previously returned.

    if _win32_links:  # nocover
        if _win32_links._win32_is_junction(link):
            return _win32_links._win32_read_junction(link)
    try:
        path = os.readlink(link)

# Path: ubelt/util_io.py
# def writeto(fpath, to_write, aslines=False, verbose=None):
# def _ensure_bytes(text):
# def readfrom(fpath, aslines=False, errors='replace', verbose=None):
# def touch(fpath, mode=0o666, dir_fd=None, verbose=0, **kwargs):
# def delete(path, verbose=False):
# 
# Path: ubelt/util_platform.py
# WIN32  = sys.platform == 'win32'  # type: bool
# LINUX  = sys.platform.startswith('linux')  # type: bool
# DARWIN = sys.platform == 'darwin'  # type: bool
# POSIX = 'posix' in sys.builtin_module_names  # type: bool
# def platform_data_dir():
# def platform_config_dir():
# def platform_cache_dir():
# def get_app_data_dir(appname, *args):
# def ensure_app_data_dir(appname, *args):
# def get_app_config_dir(appname, *args):
# def ensure_app_config_dir(appname, *args):
# def get_app_cache_dir(appname, *args):
# def ensure_app_cache_dir(appname, *args):
# def find_exe(name, multi=False, path=None):
# def find_path(name, path=None, exact=False):


# Path: ubelt/util_links.py
from os.path import exists, islink, join, normpath
from ubelt import util_io
from ubelt import util_platform
    from ubelt import _win32_links
    from ubelt import util_colors
import os
import sys
import warnings

                print('... already exists, but its a file. This will error.')
            raise FileExistsError(
                'cannot overwrite a physical path: "{}"'.format(path))
        else:  # nocover
            if verbose:
                print('... already exists, and is either a file or hard link. '
                      'Assuming it is a hard link. '
                      'On non-win32 systems this would error.')

    if _win32_links is None:
        os.symlink(path, link)
    else:  # nocover
        _win32_links._symlink(path, link, overwrite=overwrite, verbose=verbose)

    return link


def _readlink(link):
    # Note:
    # https://docs.python.org/3/library/os.html#os.readlink
    # os.readlink was changed on win32 in version 3.8: Added support for
    # directory junctions, and changed to return the substitution path (which
    # typically includes \\?\ prefix) rather than the optional “print name”
    # field that was previously returned.

    if _win32_links:  # nocover
        if _win32_links._win32_is_junction(link):
            return _win32_links._win32_read_junction(link)
    try:
        path = os.readlink(link)

        if util_platform.WIN32:  # nocover