This documentation is archived and is not being maintained.

FileSystemInfo.Refresh Method

Refreshes the state of the object.

[Visual Basic]
Public Sub Refresh()
public void Refresh();
public: void Refresh();
public function Refresh();


Exception Type Condition
ArgumentException The file is not found.
IOException A device such as a disk drive is not ready.


FileSystemInfo.Refresh takes a snapshot of the file from the current file system. Refresh cannot correct the underlying file system even if the file system returns incorrect or outdated information. This can happen on platforms such as Windows 98.

Calls must be made to Refresh before attempting to get the attribute information, or the information will be outdated.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

FileSystemInfo Class | FileSystemInfo Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File