FileSystemEventArgs.FullPath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the fully qualified path of the affected file or directory.
public:
property System::String ^ FullPath { System::String ^ get(); };
public string FullPath { get; }
member this.FullPath : string
Public ReadOnly Property FullPath As String
Property Value
The path of the affected file or directory.
Examples
The following example demonstrates the FullPath property. This code example is part of a larger example provided for the FileSystemEventArgs class.
// This method is called when a file is created, changed, or deleted.
private static void OnChanged(object source, FileSystemEventArgs e)
{
// Show that a file has been created, changed, or deleted.
WatcherChangeTypes wct = e.ChangeType;
Console.WriteLine("File {0} {1}", e.FullPath, wct.ToString());
}
' This method is called when a file is created, changed, or deleted.
Private Sub OnChanged(ByVal source As Object, ByVal e As FileSystemEventArgs)
' Show that a file has been created, changed, or deleted.
Dim wct As WatcherChangeTypes = e.ChangeType
Console.WriteLine("File {0} {1}", e.FullPath, wct.ToString())
End Sub
Remarks
This property returns the same path that FileSystemWatcher
is initialized with, even if it's a relative path.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET