Created
December 12, 2018 23:52
-
-
Save msuhanov/74fd3c795883e0491277e6e27f2434e3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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