Method AppendTimestamp
AppendTimestamp(string, DateTimeOffset)
Appends a timestamp suffix to a file name without modifying its original extension.
public static string AppendTimestamp(string path, DateTimeOffset timestamp)
Parameters
path
stringThe file name on which to append the suffix.
timestamp
DateTimeOffsetThe timestamp to use for generating the suffix.
Returns
- string
The new file name where
path
has been modified to end with the round-trip representation of the specifiedtimestamp
but without modifying the file extension.