Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env python3
import os
from time import sleep
FILE_PATH = 'ts.txt'
def get_atime_1():
result = os.stat(FILE_PATH, follow_symlinks = False)
return result.st_atime
def get_atime_2():
for entry in os.scandir('.'):
if entry.name.lower() == FILE_PATH.lower():
return entry.stat().st_atime
#print('Starting up...')
#sleep(15)
print(get_atime_1(), get_atime_2())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.