public DateTimeOffset GetCreationTime(string path)
{
if (path == null)
throw new ArgumentNullException(nameof(path));
if (path == string.Empty)
{
throw new ArgumentException(SR.Argument_EmptyPath, nameof(path));
}
EnsureStoreIsValid();
try
{
return new DateTimeOffset(File.GetCreationTime(GetFullPath(path)));
}
catch (UnauthorizedAccessException)
{
return new DateTimeOffset(1601, 1, 1, 0, 0, 0, TimeSpan.Zero).ToLocalTime();
}
}