]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/setuptools/windows_support.py
4 def windows_only(func
):
5 if platform
.system() != 'Windows':
6 return lambda *args
, **kwargs
: None
13 Set the hidden attribute on a file or directory.
15 From http://stackoverflow.com/questions/19622133/
20 __import__('ctypes.wintypes')
21 SetFileAttributes
= ctypes
.windll
.kernel32
.SetFileAttributesW
22 SetFileAttributes
.argtypes
= ctypes
.wintypes
.LPWSTR
, ctypes
.wintypes
.DWORD
23 SetFileAttributes
.restype
= ctypes
.wintypes
.BOOL
25 FILE_ATTRIBUTE_HIDDEN
= 0x02
27 ret
= SetFileAttributes(path
, FILE_ATTRIBUTE_HIDDEN
)
29 raise ctypes
.WinError()