Recommand · June 12, 2021 0

Azure DevOps, How do you get timestamps from files uploaded to repos?

Is there any way to get the last modified timestamps from files uploaded to folders in an ADO repo?

ADO Repo Folder

I have created a Python validation pipeline to check versioned file names in a folder in an Azure DevOps repo, and I was wondering if it was possible to get the last modified timestamp of the files so I know which are the latest. I tried something like this (fileNames = sorted(os.listdir(os.getcwd()), key=os.path.getmtime)) but ADO doesn’t seem to actually save the modified timestamp like files might have on a local directory. Is there any way to get this information? I know I can see it in the GIT tree.