osx - setting hidden status in Mac with Python -


to toggle hidden status of file on mac osx in python, use following code:

st = os.stat(file_path) os.chflags(file_path, st.st_flags ^ stat.uf_hidden) 

this works "files" not work "folders". note not talking files or folders start "."


edit: above code works both files , folder, made mistake in assumption...


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -