Skip to content

Commit a2e6829

Browse files
committed
os.path: Add uos compatibility.
The os.access function is only provided on unix/ffi os module.
1 parent 08d549b commit a2e6829

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python-stdlib/os.path/os/path.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import os
1+
import uos as os
22

33

44
sep = "/"
@@ -47,7 +47,11 @@ def basename(path):
4747

4848

4949
def exists(path):
50-
return os.access(path, os.F_OK)
50+
try:
51+
os.stat(path)
52+
return True
53+
except OSError:
54+
return False
5155

5256

5357
# TODO

0 commit comments

Comments
 (0)