(native_path, native_name, isdir)
Return whether a file exists and is a directory or regular.
Return whether a file exists and is a directory or regular.
Return whether a file exists and is a directory or regular .
def istype(native_path, native_name, isdir):
    """Return whether a file exists and is a directory or regular."""
    name = os.path.join(native_path, native_name)
    try:
        return os.path.isdir(name) if isdir else os.path.isfile(name)
    except (TypeError, ValueError):
        # name == u'\0' - python2 raises TypeError, python3 ValueError
        return False
def istype ( native_path , native_name , isdir ) : name = os . path . join ( native_path , native_name ) try : return os . path . isdir ( name ) if isdir else os . path . isfile ( name ) except ( TypeError , ValueError ) : # name == u'\0' - python2 raises TypeError, python3 ValueError return False