IsolatedStorageFile.GetLastWriteTime(String) Method

Definition

Returns the date and time a specified file or directory was last written to.

public DateTimeOffset GetLastWriteTime (string path);
[System.Runtime.InteropServices.ComVisible(false)]
public DateTimeOffset GetLastWriteTime (string path);

Parameters

path
String

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

Returns

The date and time that the specified file or directory was last written to. 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
.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