3
ÄvhÊ ã @ s( d dl Z d dlZdd„ Zedd„ ƒZdS )é Nc C s t jƒ dkrdd„ S | S )NZWindowsc _ s d S )N© )ÚargsÚkwargsr r ú%/usr/lib/python3.6/windows_support.pyÚ s zwindows_only..)ÚplatformÚsystem)Úfuncr r r Úwindows_only s r
c C sL t dƒ tjjj}tjjtjjf|_tjj |_
d}|| |ƒ}|sHtjƒ ‚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__ÚctypesZwindllZkernel32ZSetFileAttributesWZwintypesZLPWSTRZDWORDZargtypesZBOOLZrestypeZWinError)ÚpathZSetFileAttributesÚFILE_ATTRIBUTE_HIDDENÚretr r r Ú hide_file s
r )r r
r
r r r r r Ú s