System.IO.Abstractions.FileBase.GetLastWriteTimeUtc C# (CSharp) Méthode

GetLastWriteTimeUtc() public abstract méthode

Returns the date and time, in coordinated universal time (UTC), that the specified file or directory was last written to.

If the file described in the path parameter does not exist, this method returns 12:00 midnight, January 1, 1601 A.D. (C.E.) Coordinated Universal Time (UTC).

The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see DirectoryBase.GetCurrentDirectory.

NTFS-formatted drives may cache file meta-info, such as file creation time, for a short period of time, which is known as "file tunneling." As a result, it may be necessary to explicitly set the creation time of a file if you are overwriting or replacing an existing file.

The caller does not have the required permission. is empty, contains only white spaces, or contains invalid characters. is . The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. is in an invalid format.
public abstract GetLastWriteTimeUtc ( string path ) : DateTime
path string The file or directory for which to obtain creation date and time information.
Résultat DateTime
        public abstract DateTime GetLastWriteTimeUtc(string path);
        public abstract void Move(string sourceFileName, string destFileName);