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
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา