Created
January 27, 2018 13:08
-
-
Save Fhernd/a7ce45845348aebb5b7d2131182de790 to your computer and use it in GitHub Desktop.
Inspeccionar directorios con Python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
# Directorio actual: | |
p = pathlib.Path('.') | |
# Fecha modificación: | |
print(p.stat().st_mtime) | |
# Contenido del directorio: | |
contenido = sorted(p.glob('*')) | |
print (contenido) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment