Python os.stat_float_times() Method
os.stat_float_times() Overview
The os.stat_float_times() method is used to determine whether the stat_result displays the timestamp as a float object.
os.stat_float_times() Syntax
The syntax format of the stat_float_times() method is as follows.
os.stat_float_times([newvalue])
os.stat_float_times() Parameters
- newvalue – If True, call stat() to return floats, if False, call stat to return ints. If this parameter is not present, return the current setting.
os.stat_float_times() Return Value
Returns True or False.
os.stat_float_times() Example#1
The following example demonstrates the use of the stat_float_times() method.
#!/usr/bin/python3
import os, sys
# Stat info
statinfo = os.stat('apidemos.py')
print (statinfo)
statinfo = os.stat_float_times()
print (statinfo)
Output: