o ƒ_¶aÊã@s(ddlZddlZdd„Zedd„ƒZdS)éNcCst ¡dkr dd„S|S)NÚWindowsc_sdS)N©)ÚargsÚkwargsrrúszwindows_only..)ÚplatformÚsystem)ÚfuncrrrÚ windows_onlys r cCsLtdƒtjjj}tjjtjjf|_tjj |_ d}|||ƒ}|s$t  ¡‚dS)z‹ Set the hidden attribute on a file or directory. From http://stackoverflow.com/questions/19622133/ `path` must be text. zctypes.wintypeséN) Ú __import__ÚctypesÚwindllÚkernel32ÚSetFileAttributesWÚwintypesÚLPWSTRÚDWORDÚargtypesÚBOOLÚrestypeÚWinError)ÚpathÚSetFileAttributesÚFILE_ATTRIBUTE_HIDDENÚretrrrÚ hide_file s   ÿr)rrr rrrrrÚs