10 examples of 'os path getmtime' in Python

Every line of 'os path getmtime' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
33def getmtime(path):
34 fspath = efs2(path)
35 return os.path.getmtime(fspath)

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

141def getmtime(filename):
142 """Return the last modification time of a file, reported by os.stat()."""
143 return os.stat(filename).st_mtime
50def last_modified(fname):
51 return os.path.getmtime(fname)
190def mtime(path):
191 try:
192 return os.path.getmtime(path)
193 except os.error:
194 return 0
33def getmtime(f):
34 return check_output(['git', 'log', '-1', '--format="%ai"', '--', f])
39def get_FileModifyTime(filePath):
40 #filePath = str(filePath,'utf8')
41 t = os.path.getmtime(filePath)
42 return int(t)
16def getdate(self, fn):
17 return getmtime(fn)
173def update_mod_time(full_path):
174 """Update modification time.
176 Args:
177 full_path (str): current full path to file.
178 """
179 log.debug("updating modification time for file '%s'", full_path)
180 mod_time = path.getmtime(full_path)
181 File.__modification_cache[full_path] = mod_time
14def _get_file_timestamp(filename):
15 return os.path.getmtime(filename)
170def get_mtime(self, filename):
171 t = os.path.getmtime(filename)
172 return datetime.fromtimestamp(t)

Related snippets