natural.file

natural.file.accessed(filename)

Retrieve how long ago a file has been accessed.

Parameters:filename – name of the file
>>> print accessed(__file__)        
just now
natural.file.created(filename)

Retrieve how long ago a file has been created.

Parameters:filename – name of the file
>>> print created('/')             
8 weeks ago
natural.file.modified(filename)

Retrieve how long ago a file has been modified.

Parameters:filename – name of the file
>>> print modified('/')             
3 days ago
natural.file.size(filename, format='decimal')

Retrieve the size of a file.

Parameters:filename – name of the file
>>> size('/etc/mime.types')         
23.70 kB