def is_link(path):
 if (sys.getwindowsversion().major < 6):
  return False
 try:
  if (not _is_reparse_point(path)):
   return False
 except SaltInvocationError:
  return False
 reparse_data = _get_reparse_data(path)
 if (not reparse_data):
  return False
 header_parser = struct.Struct('L')
 (ReparseTag,) = header_parser.unpack(reparse_data[:header_parser.size])
 if (not ((ReparseTag & 2684420095) == 2684354572)):
  return False
 else:
  return True

def is_link ( path ) : if ( sys . getwindowsversion ( ) . major < 6 ) : return False try : if ( not _is_reparse_point ( path ) ) : return False except SaltInvocationError : return False reparse_data = _get_reparse_data ( path ) if ( not reparse_data ) : return False header_parser = struct . Struct ( 'L' ) ( ReparseTag , ) = header_parser . unpack ( reparse_data [ : header_parser . size ] ) if ( not ( ( ReparseTag & 2684420095 ) == 2684354572 ) ) : return False else : return True
check if the path is a symbolic link cli example: .