語言

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() 該方法定義的無效字元。

path 是 null。

這家孤立的商店已經關閉。

這間孤立的商店已被處理掉。

隔離的商店已被拆除。

-或-

隔離儲存已被禁用。

備註

若所描述 path 的檔案不存在,此方法回傳 1601 年 1 月 1 日午夜 12:00(公元曆)。協調世界時(UTC),並調整至當地時間。

適用於

另請參閱