We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82501d7 commit aac74a8Copy full SHA for aac74a8
python-stdlib/os/os/__init__.py
@@ -1,5 +1,6 @@
1
# Include built-in os module.
2
import sys
3
+
4
__path = sys.path
5
try:
6
sys.path.clear()
@@ -12,3 +13,28 @@
12
13
from . import path
14
except ImportError:
15
pass
16
17
+from collections import namedtuple
18
19
+# https://docs.python.org/3/library/os.html#os.stat_result
20
+stat_result = namedtuple(
21
+ "stat_result",
22
+ (
23
+ "st_mode",
24
+ "st_ino",
25
+ "st_dev",
26
+ "st_nlink",
27
+ "st_uid",
28
+ "st_gid",
29
+ "st_size",
30
+ "st_atime",
31
+ "st_mtime",
32
+ "st_ctime",
33
+ ),
34
+)
35
36
+__os_stat = stat
37
38
39
+def stat(path):
40
+ return stat_result(*__os_stat(path))
0 commit comments