Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check check writability of the file

os.access('sample.txt', os.W_OK)
#Output False
f = open("sample.txt", "x") # create the file
#check again
os.access('sample.txt', os.W_OK)
#Output True
Source by www.novixys.com #
 
PREVIOUS NEXT
Tagged: #check #check #writability #file
ADD COMMENT
Topic
Name
4+8 =