System.IO.File.SetLastWriteTimeUtc C# (CSharp) Méthode

SetLastWriteTimeUtc() public static méthode

public static SetLastWriteTimeUtc ( string path, System lastWriteTimeUtc ) : void
path string
lastWriteTimeUtc System
Résultat void
        public static void SetLastWriteTimeUtc(string path, System.DateTime lastWriteTimeUtc) { }
        public static void WriteAllBytes(string path, byte[] bytes) { }

Same methods

File::SetLastWriteTimeUtc ( String path, DateTime lastWriteTimeUtc ) : void

Usage Example

    /// <summary>
    ///     Sets the file's last write time.
    /// </summary>
    /// <param name="path">The path of the file.</param>
    /// <param name="lastWriteTime">A <see cref="DateTime" /> with the file attribute to set.</param>
    /// <exception cref="ArgumentNullException">
    ///     <paramref name="path" /> is <see langword="null" /> (<see langword="Nothing" /> in Visual Basic).
    /// </exception>
    public void SetLastWriteTime(
        string path,
        DateTime lastWriteTime)
    {
        _ = Requires.NotNullOrWhiteSpace(
            path,
            nameof(path));

        FSFile.SetLastWriteTimeUtc(
            path,
            lastWriteTime);
    }
All Usage Examples Of System.IO.File::SetLastWriteTimeUtc