NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FileSystemWatcher Renamed Event

Occurs when a file or directory is renamed.

The following declaration shows the syntax for a method that handles the Renamed event.

[Visual Basic]
Private Sub FileSystemWatcherName_Renamed( _
   ByVal sender As Object, _
   ByVal e As RenamedEventArgs _
)
[C#]
private void FileSystemWatcherName_Renamed(
   object sender,
   RenamedEventArgs e
);
[C++]
private: void FileSystemWatcherName_Renamed(
   Object* sender,
   RenamedEventArgs* e
);
[JScript]
private FileSystemWatcherName_Renamed(
   sender : Object,
   e : RenamedEventArgs
);

Parameters

sender
The source of the event.
e
A RenamedEventArgs that contains the event data. The following RenamedEventArgs properties provide information specific to this event.
Property Description
OldFullPath
Gets the previous fully qualified path of the affected file or directory.
OldName
Gets the old name of the affected file or directory.

Remarks

Renaming the directory you are watching will not raise a notification. Notifications are only raised for entries inside the directory you are watching.

See Also

FileSystemWatcher Class | FileSystemWatcher MembersTopic | System.IO Namespace | FileSystemWatcher.OnRenamed | FileSystemWatcher.Path | RenamedEventArgs | RenamedEventHandler