Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check accessability of the file

print(os.access('sample.txt', os.R_OK))
# Output False
f = open("sample.txt", "x") #create the file
#check again
print(os.access('sample.txt', os.R_OK))
# Output True
Source by pythonexamples.org #
 
PREVIOUS NEXT
Tagged: #check #accessability #file
ADD COMMENT
Topic
Name
8+4 =