Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4459e009
Commit
4459e009
authored
Jan 22, 2017
by
Xiang Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Issue #29092: Sync os.stat's doc and docstring on path type.
parents
a2033608
d7d87ca9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
Doc/library/os.rst
Doc/library/os.rst
+1
-1
Modules/clinic/posixmodule.c.h
Modules/clinic/posixmodule.c.h
+3
-2
Modules/posixmodule.c
Modules/posixmodule.c
+3
-2
No files found.
Doc/library/os.rst
View file @
4459e009
...
...
@@ -2213,7 +2213,7 @@ features:
Get the status of a file or a file descriptor. Perform the equivalent of a
:c:func:`stat` system call on the given path. *path* may be specified as
either a string -- directly or indirectly through the :class:`PathLike`
either a string
or bytes
-- directly or indirectly through the :class:`PathLike`
interface -- or as an open file descriptor. Return a :class:`stat_result`
object.
...
...
Modules/clinic/posixmodule.c.h
View file @
4459e009
...
...
@@ -9,7 +9,8 @@ PyDoc_STRVAR(os_stat__doc__,
"Perform a stat system call on the given path.
\n
"
"
\n
"
" path
\n
"
" Path to be examined; can be string, bytes, or open-file-descriptor int.
\n
"
" Path to be examined; can be string, bytes, path-like object or
\n
"
" open-file-descriptor int.
\n
"
" dir_fd
\n
"
" If not None, it should be a file descriptor open to a directory,
\n
"
" and path should be a relative string; path will then be relative to
\n
"
...
...
@@ -6149,4 +6150,4 @@ exit:
#ifndef OS_GETRANDOM_METHODDEF
#define OS_GETRANDOM_METHODDEF
#endif
/* !defined(OS_GETRANDOM_METHODDEF) */
/*[clinic end generated code: output=
50cfb7ebc44efb67
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
455def991740915a
input=a9049054013a1b77]*/
Modules/posixmodule.c
View file @
4459e009
...
...
@@ -2386,7 +2386,8 @@ class sched_param_converter(CConverter):
os.stat
path : path_t(allow_fd=True)
Path to be examined; can be string, bytes, or open-file-descriptor int.
Path to be examined; can be string, bytes, path-like object or
open-file-descriptor int.
*
...
...
@@ -2413,7 +2414,7 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
static
PyObject
*
os_stat_impl
(
PyObject
*
module
,
path_t
*
path
,
int
dir_fd
,
int
follow_symlinks
)
/*[clinic end generated code: output=7d4976e6f18a59c5 input=
099d356c306fa24a
]*/
/*[clinic end generated code: output=7d4976e6f18a59c5 input=
270bd64e7bb3c8f7
]*/
{
return
posix_do_stat
(
"stat"
,
path
,
dir_fd
,
follow_symlinks
);
}
...
...
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