Partager via


FileSystemEventArgs.FullPath Propriété

Définition

Obtient le chemin complet du fichier ou du répertoire concerné.

public:
 property System::String ^ FullPath { System::String ^ get(); };
public string FullPath { get; }
member this.FullPath : string
Public ReadOnly Property FullPath As String

Valeur de propriété

Chemin d’accès du fichier ou du répertoire concerné.

Exemples

L’exemple suivant illustre la FullPath propriété. Cet exemple de code fait partie d’un exemple plus grand fourni pour la FileSystemEventArgs classe.

//  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

Remarques

Cette propriété retourne le chemin d’accès FileSystemWatcher initialisé avec, même s’il s’agit d’un chemin relatif.

S’applique à