FileSystemWatcher.IncludeSubdirectories プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したパスのサブディレクトリを監視するかどうかを示す値を取得または設定します。
public:
property bool IncludeSubdirectories { bool get(); void set(bool value); };
public bool IncludeSubdirectories { get; set; }
[System.IO.IODescription("FSW_IncludeSubdirectories")]
public bool IncludeSubdirectories { get; set; }
[System.IO.IODescription("Flag to indicate we want to watch subdirectories")]
public bool IncludeSubdirectories { get; set; }
member this.IncludeSubdirectories : bool with get, set
[<System.IO.IODescription("FSW_IncludeSubdirectories")>]
member this.IncludeSubdirectories : bool with get, set
[<System.IO.IODescription("Flag to indicate we want to watch subdirectories")>]
member this.IncludeSubdirectories : bool with get, set
Public Property IncludeSubdirectories As Boolean
プロパティ値
サブディレクトリを監視する場合は true
。それ以外の場合は false
。 既定値は、false
です。
- 属性
注釈
プロパティとそのサブディレクトリでtrue
指定されたディレクトリ内に含まれるファイルとディレクトリの変更通知を監視する場合にPath設定IncludeSubdirectoriesします。 IncludeSubdirectories内部バッファーにfalse
送信される通知の数を減らすのに役立つプロパティを設定します。 不要な通知をフィルター処理する方法の詳細については、プロパティをInternalBufferSize参照してくださいNotifyFilter。
IncludeSubdirectoriesの場合true
は、直接の子ディレクトリだけでなく、サブツリー全体を再帰的に実行します。 サブツリー内のファイルまたはディレクトリへの相対パスは、監視している変更に応じて、プロパティとOldNameプロパティRenamedEventArgsで返NameFileSystemEventArgsされます。 監視している変更に応じて、完全修飾パスをFileSystemEventArgsプロパティとOldFullPathプロパティRenamedEventArgsからFullPath取得できます。
監視しているディレクトリのサブツリーにディレクトリが作成され IncludeSubdirectories 、そのディレクトリが true
自動的に監視されます。