FileSystemInfo.Refresh FileSystemInfo.Refresh FileSystemInfo.Refresh FileSystemInfo.Refresh Method

定義

重新整理物件的狀態。Refreshes the state of the object.

public:
 void Refresh();
public void Refresh ();
member this.Refresh : unit -> unit
Public Sub Refresh ()

例外狀況

裝置 (例如,磁碟機) 未就緒。A device such as a disk drive is not ready.

備註

FileSystemInfo.Refresh從目前的檔案系統取得檔案的快照集。FileSystemInfo.Refresh takes a snapshot of the file from the current file system. Refresh即使檔案系統傳回不正確或過期的資訊, 也無法更正基礎檔案系統。Refresh cannot correct the underlying file system even if the file system returns incorrect or outdated information. 這可能發生在 Windows 98 這類平臺上。This can happen on platforms such as Windows 98.

必須Refresh先對進行呼叫, 才能嘗試取得屬性資訊, 否則資訊將會過期。Calls must be made to Refresh before attempting to get the attribute information, or the information will be outdated.

適用於

另請參閱