Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2bc1f8f0
Kaydet (Commit)
2bc1f8f0
authored
Tem 24, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added getsize(), getmtime(), getatime()
üst
89a79d19
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
dospath.py
Lib/dospath.py
+18
-0
macpath.py
Lib/macpath.py
+18
-0
ntpath.py
Lib/ntpath.py
+18
-0
posixpath.py
Lib/posixpath.py
+18
-0
No files found.
Lib/dospath.py
Dosyayı görüntüle @
2bc1f8f0
...
...
@@ -124,6 +124,24 @@ def commonprefix(m):
return
prefix
# Get size, mtime, atime of files.
def
getsize
(
filename
):
"""Return the size of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_SIZE
]
def
getmtime
(
filename
):
"""Return the last modification time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
def
getatime
(
filename
):
"""Return the last access time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
# Is a path a symbolic link?
# This will always return false on systems where posix.lstat doesn't exist.
...
...
Lib/macpath.py
Dosyayı görüntüle @
2bc1f8f0
...
...
@@ -99,6 +99,24 @@ def isdir(s):
return
S_ISDIR
(
st
[
ST_MODE
])
# Get size, mtime, atime of files.
def
getsize
(
filename
):
"""Return the size of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_SIZE
]
def
getmtime
(
filename
):
"""Return the last modification time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
def
getatime
(
filename
):
"""Return the last access time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
# Return true if the pathname refers to a symbolic link.
# (Always false on the Mac, until we understand Aliases.)
...
...
Lib/ntpath.py
Dosyayı görüntüle @
2bc1f8f0
...
...
@@ -143,6 +143,24 @@ def commonprefix(m):
return
prefix
# Get size, mtime, atime of files.
def
getsize
(
filename
):
"""Return the size of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_SIZE
]
def
getmtime
(
filename
):
"""Return the last modification time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
def
getatime
(
filename
):
"""Return the last access time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
# Is a path a symbolic link?
# This will always return false on systems where posix.lstat doesn't exist.
...
...
Lib/posixpath.py
Dosyayı görüntüle @
2bc1f8f0
...
...
@@ -128,6 +128,24 @@ def commonprefix(m):
return
prefix
# Get size, mtime, atime of files.
def
getsize
(
filename
):
"""Return the size of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_SIZE
]
def
getmtime
(
filename
):
"""Return the last modification time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
def
getatime
(
filename
):
"""Return the last access time of a file, reported by os.stat()."""
st
=
os
.
stat
(
filename
)
return
st
[
stat
.
ST_MTIME
]
# Is a path a symbolic link?
# This will always return false on systems where os.lstat doesn't exist.
...
...
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