def is_path_hidden(filepath):
 name = os.path.basename(os.path.abspath(filepath))
 if isinstance(name, bytes):
  is_dotted = name.startswith('.')
 else:
  is_dotted = name.startswith(u'.')
 return (is_dotted or _has_hidden_attribute(filepath))

def is_path_hidden ( filepath ) : name = os . path . basename ( os . path . abspath ( filepath ) ) if isinstance ( name , bytes ) : is_dotted = name . startswith ( '.' ) else : is_dotted = name . startswith ( u'.' ) return ( is_dotted or _has_hidden_attribute ( filepath ) )
determines if a given file or directory is hidden .