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

GetLastAccessTimeUtc() private méthode

private GetLastAccessTimeUtc ( String path ) : DateTime
path String
Résultat DateTime
        public static DateTime GetLastAccessTimeUtc(String path)
        {
            String fullPath = Path.GetFullPath(path);
            return FileSystem.Current.GetLastAccessTime(fullPath).UtcDateTime;
        }

Same methods

File::GetLastAccessTimeUtc ( string path ) : System.DateTime

Usage Example

    /// <summary>
    ///     Gets a specific file's last access time, in UTC.
    /// </summary>
    /// <param name="path">The path of the file.</param>
    /// <returns>
    ///     A <see cref="DateTime" /> in UTC.
    /// </returns>
    /// <exception cref="ArgumentNullException">
    ///     <paramref name="path" /> is <see langword="null" /> (<see langword="Nothing" /> in Visual Basic).
    /// </exception>
    public DateTime GetLastAccessTime(string path)
    {
        _ = Requires.NotNullOrWhiteSpace(
            path,
            nameof(path));

        return(FSFile.GetLastAccessTimeUtc(path));
    }
All Usage Examples Of System.IO.File::GetLastAccessTimeUtc