IsolatedStorageFile.GetCreationTime(String) Method

Definition

Returns the creation date and time of a specified file or directory.

C#
public DateTimeOffset GetCreationTime(string path);
C#
[System.Runtime.InteropServices.ComVisible(false)]
public DateTimeOffset GetCreationTime(string path);

Parameters

path
String

The path to the file or directory for which to obtain creation date and time information.

Returns

The creation date and time for the specified file or directory. This value is expressed in local time.

Attributes

Exceptions

path is a zero-length string, contains only white space, or contains one or more invalid characters defined by the GetInvalidPathChars() method.

path is null.

The isolated store has been closed.

The isolated store has been disposed.

The isolated store has been removed.

-or-

Isolated storage is disabled.

Remarks

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

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

See also