os.Path.setModificationTime

Sets the modification time of a file.

Syntax

os.Path.setModificationTime(
     path STRING,
     time DATETIME YEAR TO FRACTION(5)
)
  1. path is the name of the file.
  2. time is the date/time to be set.

Usage

This method sets the modification time of a file as a DATETIME value.

Depending on the platform, the fraction of seconds may not be supported. Linux, Microsoft® Windows® and Apple® macOS™ support fraction of seconds.