Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stdlib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cython-plus
stdlib
Commits
600be15d
Commit
600be15d
authored
Oct 14, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve os.listdir
parent
0d3108ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
os.pxd
os.pxd
+4
-0
No files found.
os.pxd
View file @
600be15d
...
...
@@ -6,6 +6,8 @@ from libc.errno cimport errno
from
libc.stdio
cimport
FILE
,
fopen
,
fclose
,
fread
,
fwrite
,
ferror
from
libc.stdio
cimport
stdin
,
stdout
,
stderr
from
libc.string
cimport
strcmp
from
posix
cimport
unistd
from
._os
cimport
DIR
,
struct_dirent
,
opendir
,
readdir
,
closedir
...
...
@@ -50,6 +52,8 @@ cdef inline List[Str] listdir(Str path) nogil:
entry
=
readdir
(
d
)
if
entry
is
NULL
:
break
if
strcmp
(
entry
.
d_name
,
b'.'
)
==
0
or
strcmp
(
entry
.
d_name
,
b'..'
)
==
0
:
continue
entries
.
append
(
Str
(
entry
.
d_name
))
read_error
=
errno
closedir
(
d
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment