def is_hidden_folder(folder):
 def is_hidden(filepath):
  name = ek(os.path.basename, ek(os.path.abspath, filepath))
  return (name.startswith(u'.') or has_hidden_attribute(filepath))
 def has_hidden_attribute(filepath):
  try:
   attrs = ctypes.windll.kernel32.GetFileAttributesW(ctypes.c_wchar_p(unicode(filepath)))
   assert (attrs != (-1))
   result = bool((attrs & 2))
  except (AttributeError, AssertionError):
   result = False
  return result
 if ek(os.path.isdir, folder):
  if is_hidden(folder):
   return True
 return False

def is_hidden_folder ( folder ) : def is_hidden ( filepath ) : name = ek ( os . path . basename , ek ( os . path . abspath , filepath ) ) return ( name . startswith ( u'.' ) or has_hidden_attribute ( filepath ) ) def has_hidden_attribute ( filepath ) : try : attrs = ctypes . windll . kernel32 . GetFileAttributesW ( ctypes . c_wchar_p ( unicode ( filepath ) ) ) assert ( attrs != ( - 1 ) ) result = bool ( ( attrs & 2 ) ) except ( AttributeError , AssertionError ) : result = False return result if ek ( os . path . isdir , folder ) : if is_hidden ( folder ) : return True return False
returns true if folder is hidden .