kopia lustrzana https://github.com/micropython/micropython-lib
os: Use uos.ilistdir() if available.
rodzic
217bb5fd33
commit
69ab21b6fc
|
@ -106,7 +106,10 @@ def makedirs(name, mode=0o777, exist_ok=False):
|
|||
if e.args[0] != errno_.EEXIST:
|
||||
raise
|
||||
|
||||
def ilistdir(path="."):
|
||||
if hasattr(uos, "ilistdir"):
|
||||
ilistdir = uos.ilistdir
|
||||
else:
|
||||
def ilistdir(path="."):
|
||||
dir = opendir_(path)
|
||||
if not dir:
|
||||
raise_error()
|
||||
|
|
Ładowanie…
Reference in New Issue