Answers for "check accessability of the file"

0

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
Posted by: Guest on September-23-2021

Code answers related to "check accessability of the file"

Python Answers by Framework

Browse Popular Code Answers by Language