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

GetLastAccessTime() public abstract méthode

Returns the date and time the specified file or directory was last accessed.

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.

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), adjusted to local time.

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 GetLastAccessTime ( string path ) : DateTime
path string The file or directory for which to obtain access date and time information.
Résultat DateTime
        public abstract DateTime GetLastAccessTime(string path);