IsolatedStorageFile.GetLastAccessTime(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回上次访问指定文件或目录的日期和时间。
public:
DateTimeOffset GetLastAccessTime(System::String ^ path);
public DateTimeOffset GetLastAccessTime(string path);
[System.Runtime.InteropServices.ComVisible(false)]
public DateTimeOffset GetLastAccessTime(string path);
member this.GetLastAccessTime : string -> DateTimeOffset
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.GetLastAccessTime : string -> DateTimeOffset
Public Function GetLastAccessTime (path As String) As DateTimeOffset
参数
- path
- String
要获取上次访问日期和时间信息的文件或目录的路径。
返回
上次访问指定文件或目录的日期和时间。 此值以本地时间表示。
- 属性
例外
path 是一个零长度字符串,仅包含空格,或包含方法定义的 GetInvalidPathChars() 一个或多个无效字符。
path 是 null。
隔离存储已关闭。
已释放隔离存储。
注解
如果文件 path 不存在,此方法返回 1601 年 1 月 1 日凌晨 12:00(C.E.)协调世界时(UTC),调整为当地时间。