RenamedEventArgs.OldFullPath 속성

정의

영향 받는 파일 또는 디렉터리의 이전 정규화된 경로를 가져옵니다.

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

속성 값

영향 받는 파일 또는 디렉터리의 이전 정규화된 경로입니다.

예제

다음 예제는 OldFullPath 속성입니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 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

설명

이 속성은 상대 경로 FileSystemWatcher 인 경우에도 를 사용하여 초기화되는 동일한 경로를 반환합니다.

적용 대상