[issue45009] Get last modified date of Folders and Files using pathlib module

2021-08-25 Thread Gopesh Singh
New submission from Gopesh Singh : I am trying to get Last modified dates of Folders and Files mounted on Azure Databricks. I am using following Code: ``` root_dir = "/dbfs/mnt/ADLS1/LANDING/parent" def get_directories(root_dir): for child in Path(root_dir).iterdir():

[issue45009] Get last modified date of Folders and Files using pathlib module

2021-08-25 Thread Gopesh Singh
Gopesh Singh added the comment: Adding further details: // from os.path import getmtime from datetime import datetime from pathlib import Path import time // System: Operating System: Ubuntu 18.04.5 LTS Python: 3.8.8 -- ___ Python tracker <ht

[issue45009] Get last modified date of Folders and Files using os.path module

2021-08-26 Thread Gopesh Singh
Gopesh Singh added the comment: Updated title. As I used getmtime of os.path module. -- title: Get last modified date of Folders and Files using pathlib module -> Get last modified date of Folders and Files using os.path module ___ Python trac

[issue45009] Get last modified date of Folders and Files using os.path module

2021-08-26 Thread Gopesh Singh
Gopesh Singh added the comment: Thanks Vedram for the response. Changed the title. But I get the same issue with Path.stat(). When I put a sleep time for each iteration, it works fine. Else, it gives current date as modified date. -- ___ Python