FileSystemEventArgs.FullPath FileSystemEventArgs.FullPath FileSystemEventArgs.FullPath FileSystemEventArgs.FullPath Property

定义

获取受影响的文件或目录的完全限定的路径。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

属性值

受影响的文件或目录的路径。The path of the affected file or directory.

示例

下面的示例演示了FullPath属性。The following example demonstrates the FullPath property. 此代码示例是为FileSystemEventArgs类提供的更大示例的一部分。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

安全性

FileIOPermission
用于读取文件。for reading files. 关联的枚举:ReadAssociated enumeration: Read

适用于