IsolatedStorageFile.GetLastWriteTime(String) 方法

定义

返回上次写入指定文件或目录的日期和时间。

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

参数

path
String

要获取其上次写入日期和时间信息的文件或目录的路径。

返回

上次写入指定文件或目录的日期和时间。 该值用本地时间表示。

属性

例外

path 是长度为零的字符串,仅包含空格,或包含 GetInvalidPathChars() 方法定义的一个或多个无效字符。

pathnull

已关闭独立存储区。

已释放独立存储区。

已移除独立存储区。

- 或 -

已禁用独立存储。

注解

如果 描述 path 的文件不存在,此方法返回 1601 年 1 月 1 日午夜 12:00, (C.E.) 协调世界时 (UTC) ,调整为本地时间。

适用于

另请参阅