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