แก้ไข

แชร์ผ่าน


IsolatedStorageFile.GetLastWriteTime(String) Method

Definition

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

public:
 DateTimeOffset GetLastWriteTime(System::String ^ path);
public DateTimeOffset GetLastWriteTime (string path);
[System.Runtime.InteropServices.ComVisible(false)]
public DateTimeOffset GetLastWriteTime (string path);
member this.GetLastWriteTime : string -> DateTimeOffset
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.GetLastWriteTime : string -> DateTimeOffset
Public Function GetLastWriteTime (path As String) As DateTimeOffset

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

See also