Share via


RenamedEventArgs.OldFullPath Propiedad

Definición

Obtiene la ruta de acceso completa anterior del directorio o archivo afectado.

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

Valor de propiedad

La ruta de acceso completa anterior del directorio o archivo afectado.

Ejemplos

En el ejemplo siguiente se muestra la OldFullPath propiedad . Este ejemplo de código es parte de un ejemplo más grande proporcionado para la clase RenamedEventArgs.

//  This method is called when a file is renamed.
private static void OnRenamed(object source, RenamedEventArgs e)
{
    //  Show that a file has been renamed.
    WatcherChangeTypes wct = e.ChangeType;
    Console.WriteLine("File {0} {2} to {1}", e.OldFullPath, e.FullPath, wct.ToString());
}
' This method is called when a file is renamed.
Private Sub OnRenamed(ByVal source As Object, ByVal e As RenamedEventArgs)

    ' Show that a file has been renamed.
    Dim wct As WatcherChangeTypes = e.ChangeType
    Console.WriteLine("File {0} {2} to {1}", e.OldFullPath, e.FullPath, wct.ToString())
End Sub

Comentarios

Esta propiedad devuelve la misma ruta de acceso con la que FileSystemWatcher se inicializa, aunque sea una ruta de acceso relativa.

Se aplica a