a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
1161 lines
80 KiB
XML
1161 lines
80 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Type Name="FileSystemWatcher" FullName="System.IO.FileSystemWatcher">
|
|
<TypeSignature Language="C#" Maintainer="auto" Value="public class FileSystemWatcher : System.ComponentModel.Component, System.ComponentModel.ISupportInitialize" />
|
|
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit FileSystemWatcher extends System.ComponentModel.Component implements class System.ComponentModel.ISupportInitialize" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>System</AssemblyName>
|
|
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
|
|
<AssemblyVersion>1.0.3300.0</AssemblyVersion>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
|
|
<Base>
|
|
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
<Interface>
|
|
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
|
|
</Interface>
|
|
</Interfaces>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultEvent("Changed")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Use <see cref="T:System.IO.FileSystemWatcher" /> to watch for changes in a specified directory. You can watch for changes in files and subdirectories of the specified directory. You can create a component to watch files on a local computer, a network drive, or a remote computer.</para>
|
|
<para>To watch for changes in all files, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to an empty string ("") or use wildcards ("*.*"). To watch a specific file, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to the file name. For example, to watch for changes in the file MyDoc.txt, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in text files, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to "*.txt".</para>
|
|
<para>There are several types of changes you can watch for in a directory or file. For example, you can watch for changes in Attributes, the LastWrite date and time, or the Size of files or directories. This is done by setting the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> property to one of the <see cref="T:System.IO.NotifyFilters" /> values. For more information on the type of changes you can watch, see <see cref="T:System.IO.NotifyFilters" />.</para>
|
|
<para>You can watch for renaming, deletion, or creation of files or directories. For example, to watch for renaming of text files, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to "*.txt" and call the <see cref="M:System.IO.FileSystemWatcher.WaitForChanged(System.IO.WatcherChangeTypes)" /> method with a <see cref="F:System.IO.WatcherChangeTypes.Renamed" /> specified for its parameter.</para>
|
|
<para>The Windows operating system notifies your component of file changes in a buffer created by the <see cref="T:System.IO.FileSystemWatcher" />. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> and <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> properties so you can filter out unwanted change notifications. </para>
|
|
<para>For a list of initial property values for an instance of <see cref="T:System.IO.FileSystemWatcher" />, see the <see cref="M:System.IO.FileSystemWatcher.#ctor" /> constructor.</para>
|
|
<para>Please note the following when using the <see cref="T:System.IO.FileSystemWatcher" /> class.</para>
|
|
<list type="bullet">
|
|
<item>
|
|
<para>Hidden files are not ignored.</para>
|
|
</item>
|
|
<item>
|
|
<para>In some systems, <see cref="T:System.IO.FileSystemWatcher" /> reports changes to files using the short 8.3 file name format. For example, a change to "LongFileName.LongExtension" could be reported as "LongFil~.Lon".</para>
|
|
</item>
|
|
<item>
|
|
<para>This class contains a link demand and an inheritance demand at the class level that applies to all members. A <see cref="T:System.Security.SecurityException" /> is thrown when either the immediate caller or the derived class does not have full-trust permission. For details about security demands, see <format type="text/html"><a href="a33fd5f9-2de9-4653-a4f0-d9df25082c4d">Link Demands</a></format>.</para>
|
|
</item>
|
|
<item>
|
|
<para>The maximum size you can set for the <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> property for monitoring a directory over the network is 64 KB.</para>
|
|
</item>
|
|
</list>
|
|
<block subset="none" type="note">
|
|
<para> Running <see cref="T:System.IO.FileSystemWatcher" /> on Windows 98 is not supported.</para>
|
|
</block>
|
|
<format type="text/html">
|
|
<h2>Copying and moving folders</h2>
|
|
</format>
|
|
<para>The operating system and <see cref="T:System.IO.FileSystemWatcher" /> object interpret a cut-and-paste action or a move action as a rename action for a folder and its contents. If you cut and paste a folder with files into a folder being watched, the <see cref="T:System.IO.FileSystemWatcher" /> object reports only the folder as new, but not its contents because they are essentially only renamed. </para>
|
|
<para>To be notified that the contents of folders have been moved or copied into a watched folder, provide <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnRenamed(System.IO.RenamedEventArgs)" /> event handler methods as suggested in the following table.</para>
|
|
<list type="table">
|
|
<listheader>
|
|
<item>
|
|
<term>
|
|
<para>Event Handler</para>
|
|
</term>
|
|
<description>
|
|
<para>Events Handled</para>
|
|
</description>
|
|
<description>
|
|
<para>Performs</para>
|
|
</description>
|
|
</item>
|
|
</listheader>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" />
|
|
</para>
|
|
</term>
|
|
<description>
|
|
<para>
|
|
<see cref="E:System.IO.FileSystemWatcher.Changed" />, <see cref="E:System.IO.FileSystemWatcher.Created" />, <see cref="E:System.IO.FileSystemWatcher.Deleted" /></para>
|
|
</description>
|
|
<description>
|
|
<para>Report changes in file attributes, created files, and deleted files.</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnRenamed(System.IO.RenamedEventArgs)" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>
|
|
<see cref="E:System.IO.FileSystemWatcher.Renamed" />
|
|
</para>
|
|
</description>
|
|
<description>
|
|
<para>List the old and new paths of renamed files and folders, expanding recursively if needed.</para>
|
|
</description>
|
|
</item>
|
|
</list>
|
|
<format type="text/html">
|
|
<h2>Events and Buffer Sizes</h2>
|
|
</format>
|
|
<para>Note that several factors can affect which file system change events are raised, as described by the following:</para>
|
|
<list type="bullet">
|
|
<item>
|
|
<para>Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and some <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</item>
|
|
<item>
|
|
<para>The <see cref="T:System.IO.FileSystemWatcher" /> can watch disks as long as they are not switched or removed. The <see cref="T:System.IO.FileSystemWatcher" /> does not raise events for CDs and DVDs, because time stamps and properties cannot change. Remote computers must have one of the required platforms installed for the component to function properly.</para>
|
|
</item>
|
|
<item>
|
|
<para>If multiple <see cref="T:System.IO.FileSystemWatcher" /> objects are watching the same UNC path in Windows XP prior to Service Pack 1, or Windows 2000 SP2 or earlier, then only one of the objects will raise an event. On machines running Windows XP SP1 and newer, Windows 2000 SP3 or newer or Windows Server 2003, all <see cref="T:System.IO.FileSystemWatcher" /> objects will raise the appropriate events.</para>
|
|
</item>
|
|
</list>
|
|
<para>Note that a <see cref="T:System.IO.FileSystemWatcher" /> may miss an event when the buffer size is exceeded. To avoid missing events, follow these guidelines:</para>
|
|
<list type="bullet">
|
|
<item>
|
|
<para>Increase the buffer size by setting the <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> property. </para>
|
|
</item>
|
|
<item>
|
|
<para>Avoid watching files with long file names, because a long file name contributes to filling up the buffer. Consider renaming these files using shorter names.</para>
|
|
</item>
|
|
<item>
|
|
<para>Keep your event handling code as short as possible.</para>
|
|
</item>
|
|
</list>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.</para>
|
|
</summary>
|
|
</Docs>
|
|
<Members>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public FileSystemWatcher ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue />
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>You cannot watch a remote computer that does not have Windows NT or Windows 2000. You cannot watch a remote Windows NT 4.0 computer from a Windows NT 4.0 computer.</para>
|
|
<para>The following table shows initial property values for an instance of <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
<list type="table">
|
|
<listheader>
|
|
<item>
|
|
<term>
|
|
<para>Property </para>
|
|
</term>
|
|
<description>
|
|
<para>Initial Value </para>
|
|
</description>
|
|
</item>
|
|
</listheader>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>bitwise OR combination of LastWrite, FileName, and DirectoryName </para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>false </para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.Filter" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>"*.*" (Watch all files.) </para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>false </para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>8192 </para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.Path" /> </para>
|
|
</term>
|
|
<description>
|
|
<para>empty string ("") </para>
|
|
</description>
|
|
</item>
|
|
</list>
|
|
<block subset="none" type="note">
|
|
<para>The component will not watch the specified directory until the <see cref="P:System.IO.FileSystemWatcher.Path" /> is set, and <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> is true.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.IO.FileSystemWatcher" /> class.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public FileSystemWatcher (string path);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string path) cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="path" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<block subset="none" type="note">
|
|
<para>The component will not watch the specified directory until the <see cref="P:System.IO.FileSystemWatcher.Path" /> is set, and <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> is true.</para>
|
|
</block>
|
|
<para>The component can watch files on your personal computer, a network drive, or a remote computer.</para>
|
|
<para>You cannot watch a remote computer that does not have Windows NT or Windows 2000. You cannot watch a remote Windows NT 4.0 computer from a Windows NT 4.0 computer. The <see cref="P:System.IO.FileSystemWatcher.Filter" /> property is set by default to watch all files.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.IO.FileSystemWatcher" /> class, given the specified directory to monitor.</para>
|
|
</summary>
|
|
<param name="path">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The directory to monitor, in standard or Universal Naming Convention (UNC) notation. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public FileSystemWatcher (string path, string filter);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string path, string filter) cil managed" />
|
|
<MemberType>Constructor</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="path" Type="System.String" />
|
|
<Parameter Name="filter" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<block subset="none" type="note">
|
|
<para>The component will not watch the specified directory until the <see cref="P:System.IO.FileSystemWatcher.Path" /> is set, and <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> is true.</para>
|
|
</block>
|
|
<para>The component can watch files on your personal computer, a network drive, or a remote computer.</para>
|
|
<para>You cannot watch a remote computer that does not have Windows NT or Windows 2000. You cannot watch a remote Windows NT 4.0 computer from a Windows NT 4.0 computer.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Initializes a new instance of the <see cref="T:System.IO.FileSystemWatcher" /> class, given the specified directory and type of files to monitor.</para>
|
|
</summary>
|
|
<param name="path">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The directory to monitor, in standard or Universal Naming Convention (UNC) notation. </param>
|
|
<param name="filter">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The type of files to watch. For example, "*.txt" watches for changes to all text files. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="BeginInit">
|
|
<MemberSignature Language="C#" Value="public void BeginInit ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInit() cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The vsprvslong design environment uses this method to start the initialization of a component used on a form or used by another component. The <see cref="M:System.IO.FileSystemWatcher.EndInit" /> method ends the initialization. Using the <see cref="M:System.IO.FileSystemWatcher.BeginInit" /> and <see cref="M:System.IO.FileSystemWatcher.EndInit" /> methods prevents the control from being used before it is fully initialized.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Begins the initialization of a <see cref="T:System.IO.FileSystemWatcher" /> used on a form or used by another component. The initialization occurs at run time.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Changed">
|
|
<MemberSignature Language="C#" Value="public event System.IO.FileSystemEventHandler Changed;" />
|
|
<MemberSignature Language="ILAsm" Value=".event class System.IO.FileSystemEventHandler Changed" />
|
|
<MemberType>Event</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Occurs when a file/directory change matches the filter")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.FileSystemEventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The <see cref="E:System.IO.FileSystemWatcher.Changed" /> event is raised when changes are made to the size, system attributes, last write time, last access time, or security permissions of a file or directory in the directory being monitored.</para>
|
|
<block subset="none" type="note">
|
|
<para>Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and some <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</block>
|
|
<para>Use <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> to restrict the number of notifications raised when this event is handled.</para>
|
|
<block subset="none" type="note">
|
|
<para>The <see cref="E:System.IO.FileSystemWatcher.Changed" /> event is raised unexpectedly when a file is renamed, but is not raised when a directory is renamed. To watch for renaming, use the <see cref="E:System.IO.FileSystemWatcher.Renamed" /> event.</para>
|
|
</block>
|
|
<block subset="none" type="note">
|
|
<para>The order in which the <see cref="E:System.IO.FileSystemWatcher.Changed" /> event is raised in relation to the other <see cref="T:System.IO.FileSystemWatcher" /> events may change when the <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> property is not null.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is changed.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Created">
|
|
<MemberSignature Language="C#" Value="public event System.IO.FileSystemEventHandler Created;" />
|
|
<MemberSignature Language="ILAsm" Value=".event class System.IO.FileSystemEventHandler Created" />
|
|
<MemberType>Event</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Occurs when a file/directory creation matches the filter")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.FileSystemEventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Some common occurrences, such as copying or moving a file or directory, do not correspond directly to an event, but these occurrences do cause events to be raised. When you copy a file or directory, the system raises a <see cref="E:System.IO.FileSystemWatcher.Created" /> event in the directory to which the file was copied, if that directory is being watched. If the directory from which you copied was being watched by another instance of <see cref="T:System.IO.FileSystemWatcher" />, no event would be raised. For example, you create two instances of <see cref="T:System.IO.FileSystemWatcher" />. FileSystemWatcher1 is set to watch "C:\My Documents", and FileSystemWatcher2 is set to watch "C:\Your Documents". If you copy a file from "My Documents" into "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event will be raised by FileSystemWatcher2, but no event is raised for FileSystemWatcher1. Unlike copying, moving a file or directory would raise two events. From the previous example, if you moved a file from "My Documents" to "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event would be raised by FileSystemWatcher2 and a <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event would be raised by FileSystemWatcher1.</para>
|
|
<block subset="none" type="note">
|
|
<para>Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and some <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</block>
|
|
<block subset="none" type="note">
|
|
<para>The order in which the <see cref="E:System.IO.FileSystemWatcher.Created" /> event is raised in relation to the other <see cref="T:System.IO.FileSystemWatcher" /> events may change when the <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> property is not null.</para>
|
|
</block>
|
|
<para>The <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event is raised as soon as a file is created. If a file is being copied or transferred into a watched directory, the <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event will be raised immediately, followed by one or more <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> events.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is created.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Deleted">
|
|
<MemberSignature Language="C#" Value="public event System.IO.FileSystemEventHandler Deleted;" />
|
|
<MemberSignature Language="ILAsm" Value=".event class System.IO.FileSystemEventHandler Deleted" />
|
|
<MemberType>Event</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Occurs when a file/directory deletion matches the filter")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.FileSystemEventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Some common occurrences, such as copying or moving a file or directory, do not correspond directly to an event, but these occurrences do cause events to be raised. When you copy a file or directory, the system raises a <see cref="E:System.IO.FileSystemWatcher.Created" /> event in the directory to which the file was copied, if that directory is being watched. If the directory from which you copied was being watched by another instance of <see cref="T:System.IO.FileSystemWatcher" />, no event would be raised. For example, you create two instances of <see cref="T:System.IO.FileSystemWatcher" />. FileSystemWatcher1 is set to watch "C:\My Documents", and FileSystemWatcher2 is set to watch "C:\Your Documents". If you copy a file from "My Documents" into "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event will be raised by FileSystemWatcher2, but no event is raised for FileSystemWatcher1. Unlike copying, moving a file or directory would raise two events. From the previous example, if you moved a file from "My Documents" to "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event would be raised by FileSystemWatcher2 and a <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event would be raised by FileSystemWatcher1.</para>
|
|
<block subset="none" type="note">
|
|
<para>Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and some <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</block>
|
|
<block subset="none" type="note">
|
|
<para>The order in which the <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event is raised in relation to the other <see cref="T:System.IO.FileSystemWatcher" /> events may change when the <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> property is not null.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is deleted.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Dispose">
|
|
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="disposing" Type="System.Boolean" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This method is called by the public <see cref="M:System.ComponentModel.Component.Dispose" /> method and the <see cref="M:System.Object.Finalize" /> method. <see cref="M:System.ComponentModel.Component.Dispose" /> invokes the protected <see cref="M:System.IO.FileSystemWatcher.Dispose(System.Boolean)" /> method with the <paramref name="disposing" /> parameter set to true. <see cref="M:System.Object.Finalize" /> invokes <see cref="M:System.IO.FileSystemWatcher.Dispose(System.Boolean)" /> with <paramref name="disposing" /> set to false.</para>
|
|
<para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.IO.Compression.DeflateStream" /> references. This method invokes the <see cref="M:System.ComponentModel.Component.Dispose" /> method of each referenced object.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Releases the unmanaged resources used by the <see cref="T:System.IO.FileSystemWatcher" /> and optionally releases the managed resources.</para>
|
|
</summary>
|
|
<param name="disposing">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="EnableRaisingEvents">
|
|
<MemberSignature Language="C#" Value="public bool EnableRaisingEvents { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance bool EnableRaisingEvents" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Flag to indicate if this instance is active")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'bool'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The component will not raise events unless you set <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> to true.</para>
|
|
<block subset="none" type="note">
|
|
<para>The component will not watch the specified directory until the <see cref="P:System.IO.FileSystemWatcher.Path" /> property has been set and <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> is true.</para>
|
|
</block>
|
|
<para>The <see cref="M:System.IO.FileSystemWatcher.WaitForChanged(System.IO.WatcherChangeTypes,System.Int32)" /> method allows event handlers to be invoked to respond to file changes even if this property is set to false.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets a value indicating whether the component is enabled.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="EndInit">
|
|
<MemberSignature Language="C#" Value="public void EndInit ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInit() cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>The vsprvslong design environment uses this method to end the initialization of a component used on a form or used by another component. The <see cref="M:System.IO.FileSystemWatcher.BeginInit" /> method starts the initialization. Using the <see cref="M:System.IO.FileSystemWatcher.BeginInit" /> and <see cref="M:System.IO.FileSystemWatcher.EndInit" /> methods prevents the control from being used before it is fully initialized.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Ends the initialization of a <see cref="T:System.IO.FileSystemWatcher" /> used on a form or used by another component. The initialization occurs at run time.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Error">
|
|
<MemberSignature Language="C#" Value="public event System.IO.ErrorEventHandler Error;" />
|
|
<MemberSignature Language="ILAsm" Value=".event class System.IO.ErrorEventHandler Error" />
|
|
<MemberType>Event</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.ErrorEventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This event is raised whenever something prevents the <see cref="T:System.IO.FileSystemWatcher" /> object from monitoring changes. For example, if the object is monitoring changes in a remote directory and the connection to that directory is lost, the <see cref="E:System.IO.FileSystemWatcher.Error" /> event is raised.</para>
|
|
<para>The system notifies you of file changes, and it stores those changes in a buffer that the component creates and passes to the APIs. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer is expensive, because it comes from non paged memory that cannot be swapped out to disk, so keep the buffer as small as possible. To avoid a buffer overflow, use the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" />, <see cref="P:System.IO.FileSystemWatcher.Filter" />, and <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> properties to filter out unwanted change notifications.</para>
|
|
<block subset="none" type="note">
|
|
<para>Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> and some <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> and <see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</block>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Occurs when the instance of <see cref="T:System.IO.FileSystemWatcher" /> is unable to continue monitoring changes or when the internal buffer overflows.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Filter">
|
|
<MemberSignature Language="C#" Value="public string Filter { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance string Filter" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue("*.*")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.RecommendedAsConfigurable(true)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("File name filter pattern")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.String</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'string'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>To watch changes in all files, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to an empty string (""). To watch a specific file, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to the file name. For example, to watch for changes in the file MyDoc.txt, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in any text files, set the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to "*.txt". Use of multiple filters such as "*.txt|*.doc" is not supported.</para>
|
|
<para>The <see cref="P:System.IO.FileSystemWatcher.Filter" /> property can be changed after the <see cref="T:System.IO.FileSystemWatcher" /> object has started receiving events.</para>
|
|
<para>For more information about filtering out unwanted notifications, see the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" />, <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" />, and <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> properties.</para>
|
|
<para>
|
|
<see cref="P:System.IO.FileSystemWatcher.Filter" /> accepts wildcards for matching files, as shown in the following examples.</para>
|
|
<list type="table">
|
|
<listheader>
|
|
<item>
|
|
<term>
|
|
<para>Filter string</para>
|
|
</term>
|
|
<description>
|
|
<para>Watches the following files</para>
|
|
</description>
|
|
</item>
|
|
</listheader>
|
|
<item>
|
|
<term>
|
|
<para>*.*</para>
|
|
</term>
|
|
<description>
|
|
<para>All files (default). An empty string ("") also watches all files.</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>*.txt</para>
|
|
</term>
|
|
<description>
|
|
<para>All files with a "txt" extension.</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>*recipe.doc</para>
|
|
</term>
|
|
<description>
|
|
<para>All files ending in "recipe" with a "doc" extension.</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>win*.xml</para>
|
|
</term>
|
|
<description>
|
|
<para>All files beginning with "win" with an "xml" extension.</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>Sales*200?.xls </para>
|
|
</term>
|
|
<description>
|
|
<para>Matches the following:</para>
|
|
<para>Sales July 2001.xlsSales Aug 2002.xlsSales March 2004.xls</para>
|
|
<para>but does not match:</para>
|
|
<para>Sales Nov 1999.xls</para>
|
|
</description>
|
|
</item>
|
|
<item>
|
|
<term>
|
|
<para>MyReport.Doc</para>
|
|
</term>
|
|
<description>
|
|
<para>Watches only MyReport.doc</para>
|
|
</description>
|
|
</item>
|
|
</list>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the filter string used to determine what files are monitored in a directory.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Finalize">
|
|
<MemberSignature Language="C#" Value="~FileSystemWatcher ();" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Finalize() cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>To be added.</summary>
|
|
<remarks>To be added.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="IncludeSubdirectories">
|
|
<MemberSignature Language="C#" Value="public bool IncludeSubdirectories { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance bool IncludeSubdirectories" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Flag to indicate we want to watch subdirectories")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'bool'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Set <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> to true when you want to watch for change notifications for files and directories contained within the directory specified through the <see cref="P:System.IO.FileSystemWatcher.Path" /> property, and its subdirectories. Setting the <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> property to false helps reduce the number of notifications sent to the internal buffer. For more information on filtering out unwanted notifications, see the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> and <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> properties.</para>
|
|
<para>When true, <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> is recursive through the entire sub tree, not just the immediate child directories. The relative path to a file or directory within the sub tree returns in the <see cref="P:System.IO.FileSystemEventArgs.Name" /> property of <see cref="T:System.IO.FileSystemEventArgs" /> and the <see cref="P:System.IO.RenamedEventArgs.OldName" /> property of <see cref="T:System.IO.RenamedEventArgs" />, depending on changes you are watching for. You can get the fully qualified path from the <see cref="P:System.IO.FileSystemEventArgs.FullPath" /> property of <see cref="T:System.IO.FileSystemEventArgs" /> and the <see cref="P:System.IO.RenamedEventArgs.OldFullPath" /> property of <see cref="T:System.IO.RenamedEventArgs" />, depending on the changes you are watching for.</para>
|
|
<para>If a directory is created in the sub tree of the directory you are watching, and <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> is true, that directory will automatically be watched.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets a value indicating whether subdirectories within the specified path should be monitored.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="InternalBufferSize">
|
|
<MemberSignature Language="C#" Value="public int InternalBufferSize { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance int32 InternalBufferSize" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue(8192)</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'int'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>You can set the buffer to 4 KB or larger, but it must not exceed 64 KB. If you try to set the <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> property to less than 4096 bytes, your value is discarded and the <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> property is set to 4096 bytes. For best performance, use a multiple of 4 KB on Intel-based computers.</para>
|
|
<para>The system notifies the component of file changes, and it stores those changes in a buffer the component creates and passes to the APIs. Each event can use up to 16 bytes of memory, not including the file name. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer can prevent missing file system change events. However, increasing buffer size is expensive, because it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small as possible. To avoid a buffer overflow, use the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> and <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> properties to filter out unwanted change notifications.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the size (in bytes) of the internal buffer.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="NotifyFilter">
|
|
<MemberSignature Language="C#" Value="public System.IO.NotifyFilters NotifyFilter { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.IO.NotifyFilters NotifyFilter" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Flag to indicate which change event we want to monitor")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.NotifyFilters</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'NotifyFilters'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>You can combine the members of the <see cref="T:System.IO.NotifyFilters" /> enumeration to watch for more than one type of change at a time. For example, you can watch for changes in size of a file, and for changes in the LastWrite time. This raises an event anytime there is a change in file or folder size, or a change in the LastWrite time of the file or folder.</para>
|
|
<para>This is one way to filter out unwanted notifications. For more information on filtering out unwanted notifications, see the <see cref="P:System.IO.FileSystemWatcher.Filter" />, <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" />, and <see cref="P:System.IO.FileSystemWatcher.InternalBufferSize" /> properties.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the type of changes to watch for.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnChanged">
|
|
<MemberSignature Language="C#" Value="protected void OnChanged (System.IO.FileSystemEventArgs e);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void OnChanged(class System.IO.FileSystemEventArgs e) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="e" Type="System.IO.FileSystemEventArgs" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> is called when changes are made to the size, system attributes, last write time, last access time, or security permissions of a file or directory in the directory being monitored.</para>
|
|
<para>Use the <see cref="P:System.IO.FileSystemWatcher.NotifyFilter" /> property to restrict the number of events raised when the <see cref="E:System.IO.FileSystemWatcher.Changed" /> event is handled.</para>
|
|
<para>The <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event is raised as soon as a file is created. If a file is being copied or transferred into a watched directory, the <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event will be raised immediately, followed by one or more <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> events.</para>
|
|
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="F2ADAF01-1ED1-42E1-8C31-8D467E7E0EE2">[<topic://cpconProvidingEventFunctionality>]</a></format>.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Raises the <see cref="E:System.IO.FileSystemWatcher.Changed" /> event.</para>
|
|
</summary>
|
|
<param name="e">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnCreated">
|
|
<MemberSignature Language="C#" Value="protected void OnCreated (System.IO.FileSystemEventArgs e);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void OnCreated(class System.IO.FileSystemEventArgs e) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="e" Type="System.IO.FileSystemEventArgs" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> is called when a file or directory is created in the directory being monitored.</para>
|
|
<para>Some common occurrences, such as copying or moving a file or directory, do not correspond directly to an event, but these occurrences do cause events to be raised. When you copy a file or directory, the system raises a <see cref="E:System.IO.FileSystemWatcher.Created" /> event in the directory to which the file was copied, if that directory is being watched. If the directory from which you copied was being watched by another instance of <see cref="T:System.IO.FileSystemWatcher" />, no event would be raised. For example, you create two instances of <see cref="T:System.IO.FileSystemWatcher" />. FileSystemWatcher1 is set to watch "C:\My Documents", and FileSystemWatcher2 is set to watch "C:\Your Documents". If you copy a file from "My Documents" and paste it into "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event will be raised in FileSystemWatcher2, but no event is raised for FileSystemWatcher1. Unlike copying, moving a file or directory raises two events. From the previous example, if you moved a file from "My Documents" to "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event would be raised in FileSystemWatcher2 and a <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event would be raised in FileSystemWatcher1.</para>
|
|
<para>The <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event is raised as soon as a file is created. If a file is being copied or transferred into a watched directory, the <see cref="M:System.IO.FileSystemWatcher.OnCreated(System.IO.FileSystemEventArgs)" /> event will be raised immediately, followed by one or more <see cref="M:System.IO.FileSystemWatcher.OnChanged(System.IO.FileSystemEventArgs)" /> events.</para>
|
|
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="F2ADAF01-1ED1-42E1-8C31-8D467E7E0EE2">[<topic://cpconProvidingEventFunctionality>]</a></format>.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Raises the <see cref="E:System.IO.FileSystemWatcher.Created" /> event.</para>
|
|
</summary>
|
|
<param name="e">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnDeleted">
|
|
<MemberSignature Language="C#" Value="protected void OnDeleted (System.IO.FileSystemEventArgs e);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void OnDeleted(class System.IO.FileSystemEventArgs e) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="e" Type="System.IO.FileSystemEventArgs" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnDeleted(System.IO.FileSystemEventArgs)" /> is called when a file or directory, within the directory being monitored, is deleted.</para>
|
|
<para>Some common occurrences, such as copying or moving a file or directory, do not correspond directly to an event, but these occurrences do cause events to be raised. When you copy a file or directory, the system raises a <see cref="E:System.IO.FileSystemWatcher.Created" /> event in the directory to which the file was copied, if that directory is being watched. If the directory from which you copied was being watched by another instance of <see cref="T:System.IO.FileSystemWatcher" />, no event would be raised. For example, you create two instances of <see cref="T:System.IO.FileSystemWatcher" />. FileSystemWatcher1 is set to watch "C:\My Documents", and FileSystemWatcher2 is set to watch "C:\Your Documents". If you copy a file from "My Documents" into "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event will be raised by FileSystemWatcher2, but no event is raised for FileSystemWatcher1. Unlike copying, moving a file or directory raises two events. From the previous example, if you moved a file from "My Documents" to "Your Documents", a <see cref="E:System.IO.FileSystemWatcher.Created" /> event would be raised by FileSystemWatcher2 and a <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event would be raised by FileSystemWatcher1.</para>
|
|
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="F2ADAF01-1ED1-42E1-8C31-8D467E7E0EE2">[<topic://cpconProvidingEventFunctionality>]</a></format>.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Raises the <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event.</para>
|
|
</summary>
|
|
<param name="e">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnError">
|
|
<MemberSignature Language="C#" Value="protected void OnError (System.IO.ErrorEventArgs e);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void OnError(class System.IO.ErrorEventArgs e) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="e" Type="System.IO.ErrorEventArgs" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnError(System.IO.ErrorEventArgs)" /> is called when an error occurs.</para>
|
|
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="F2ADAF01-1ED1-42E1-8C31-8D467E7E0EE2">[<topic://cpconProvidingEventFunctionality>]</a></format>.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Raises the <see cref="E:System.IO.FileSystemWatcher.Error" /> event.</para>
|
|
</summary>
|
|
<param name="e">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.IO.ErrorEventArgs" /> that contains the event data. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="OnRenamed">
|
|
<MemberSignature Language="C#" Value="protected void OnRenamed (System.IO.RenamedEventArgs e);" />
|
|
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void OnRenamed(class System.IO.RenamedEventArgs e) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="e" Type="System.IO.RenamedEventArgs" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>
|
|
<see cref="M:System.IO.FileSystemWatcher.OnRenamed(System.IO.RenamedEventArgs)" /> is called when a file or directory within the directory being monitored is renamed.</para>
|
|
<para>Raising an event invokes the event handler through a delegate. For more information, see <format type="text/html"><a href="F2ADAF01-1ED1-42E1-8C31-8D467E7E0EE2">[<topic://cpconProvidingEventFunctionality>]</a></format>.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Raises the <see cref="E:System.IO.FileSystemWatcher.Renamed" /> event.</para>
|
|
</summary>
|
|
<param name="e">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.IO.RenamedEventArgs" /> that contains the event data. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Path">
|
|
<MemberSignature Language="C#" Value="public string Path { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance string Path" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue("")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.Editor("System.Diagnostics.Design.FSWPathEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.RecommendedAsConfigurable(true)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("The directory to monitor")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.String</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'string'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This is a fully qualified path to a directory. If the <see cref="P:System.IO.FileSystemWatcher.IncludeSubdirectories" /> property is true, this directory is the root at which the system watches for changes; otherwise it is the only directory watched. To watch a specific file, set the <see cref="P:System.IO.FileSystemWatcher.Path" /> property to the fully qualified, correct directory, and the <see cref="P:System.IO.FileSystemWatcher.Filter" /> property to the file name.</para>
|
|
<para>The <see cref="P:System.IO.FileSystemWatcher.Path" /> property supports Universal Naming Convention (UNC) paths.</para>
|
|
<block subset="none" type="note">
|
|
<para>This property must be set before the component can watch for changes.</para>
|
|
</block>
|
|
<para>When a directory is renamed, the <see cref="T:System.IO.FileSystemWatcher" /> automatically reattaches itself to the newly renamed item. For example, if you set the <see cref="P:System.IO.FileSystemWatcher.Path" /> property to "C:\My Documents" and then manually rename the directory to "C:\Your Documents", the component continues listening for change notifications on the newly renamed directory. However, when you ask for the <see cref="P:System.IO.FileSystemWatcher.Path" /> property, it contains the old path. This happens because the component determines what directory watches based on the handle, rather than the name of the directory. Renaming does not affect the handle. So, if you destroy the component, and then recreate it without updating the <see cref="P:System.IO.FileSystemWatcher.Path" /> property, your application will fail because the directory no longer exists.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the path of the directory to watch.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Renamed">
|
|
<MemberSignature Language="C#" Value="public event System.IO.RenamedEventHandler Renamed;" />
|
|
<MemberSignature Language="ILAsm" Value=".event class System.IO.RenamedEventHandler Renamed" />
|
|
<MemberType>Event</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("Occurs when a file/directory rename matches the filter")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.RenamedEventHandler</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Renaming the directory you are watching will not raise a notification. Notifications are only raised for entries inside the directory you are watching.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is renamed.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Site">
|
|
<MemberSignature Language="C#" Value="public override System.ComponentModel.ISite Site { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.ISite Site" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.ComponentModel.ISite</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'ComponentModel.ISite'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Sites bind a <see cref="T:System.ComponentModel.Component" /> to a <see cref="P:System.ComponentModel.Design.IDesignerHost.Container" /> and enable communication between them, as well as provide a way for the container to manage its components.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets an <see cref="T:System.ComponentModel.ISite" /> for the <see cref="T:System.IO.FileSystemWatcher" />.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="SynchronizingObject">
|
|
<MemberSignature Language="C#" Value="public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { get; set; }" />
|
|
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.ISynchronizeInvoke SynchronizingObject" />
|
|
<MemberType>Property</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
|
|
</Attribute>
|
|
<Attribute>
|
|
<AttributeName>System.IO.IODescription("The object used to marshal the event handler calls resulting from a directory change")</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
<ReturnValue>
|
|
<ReturnType>System.ComponentModel.ISynchronizeInvoke</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
</Parameters>
|
|
<Docs>
|
|
<value>To be added: an object of type 'ComponentModel.ISynchronizeInvoke'</value>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>When <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> is null, methods handling the <see cref="E:System.IO.FileSystemWatcher.Changed" />, <see cref="E:System.IO.FileSystemWatcher.Created" />, <see cref="E:System.IO.FileSystemWatcher.Deleted" />, and <see cref="E:System.IO.FileSystemWatcher.Renamed" /> events are called on a thread from the system thread pool. For more information on system thread pools, see <see cref="T:System.Threading.ThreadPool" />.</para>
|
|
<para>When the <see cref="E:System.IO.FileSystemWatcher.Changed" />, <see cref="E:System.IO.FileSystemWatcher.Created" />, <see cref="E:System.IO.FileSystemWatcher.Deleted" />, and <see cref="E:System.IO.FileSystemWatcher.Renamed" /> events are handled by a visual Windows Forms component, such as a <see cref="T:System.Windows.Forms.Button" />, accessing the component through the system thread pool might not work, or may result in an exception. Avoid this by setting <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> to a Windows Forms component, which causes the methods that handle the <see cref="E:System.IO.FileSystemWatcher.Changed" />, <see cref="E:System.IO.FileSystemWatcher.Created" />, <see cref="E:System.IO.FileSystemWatcher.Deleted" />, and <see cref="E:System.IO.FileSystemWatcher.Renamed" /> events to be called on the same thread on which the component was created.</para>
|
|
<para>If the <see cref="T:System.IO.FileSystemWatcher" /> is used inside vsprvslong in a Windows Forms designer, <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> automatically sets to the control that contains the <see cref="T:System.IO.FileSystemWatcher" />. For example, if you place a <see cref="T:System.IO.FileSystemWatcher" /> on a designer for Form1 (which inherits from <see cref="T:System.Windows.Forms.Form" />) the <see cref="P:System.IO.FileSystemWatcher.SynchronizingObject" /> property of <see cref="T:System.IO.FileSystemWatcher" /> is set to the instance of Form1.</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>Gets or sets the object used to marshal the event handler calls issued as a result of a directory change.</para>
|
|
</summary>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="WaitForChanged">
|
|
<MemberSignature Language="C#" Value="public System.IO.WaitForChangedResult WaitForChanged (System.IO.WatcherChangeTypes changeType);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.IO.WaitForChangedResult WaitForChanged(valuetype System.IO.WatcherChangeTypes changeType) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.WaitForChangedResult</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="changeType" Type="System.IO.WatcherChangeTypes" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This method waits indefinitely until the first change occurs and then returns. This is the same as using <see cref="M:System.IO.FileSystemWatcher.WaitForChanged(System.IO.WatcherChangeTypes)" /> with the <paramref name="timeout" /> parameter set to -1.</para>
|
|
<block subset="none" type="note">
|
|
<para>This method allows an event handler to be invoked to respond to file changes even if the <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> property is set to false.</para>
|
|
</block>
|
|
<para>In some systems, <see cref="T:System.IO.FileSystemWatcher" /> reports changes to files using the short 8.3 file name format. For example, a change to "LongFileName.LongExtension" could be reported as "LongFi~.Lon".</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>A <see cref="T:System.IO.WaitForChangedResult" /> that contains specific information on the change that occurred.</para>
|
|
</returns>
|
|
<param name="changeType">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.IO.WatcherChangeTypes" /> to watch for. </param>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="WaitForChanged">
|
|
<MemberSignature Language="C#" Value="public System.IO.WaitForChangedResult WaitForChanged (System.IO.WatcherChangeTypes changeType, int timeout);" />
|
|
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.IO.WaitForChangedResult WaitForChanged(valuetype System.IO.WatcherChangeTypes changeType, int32 timeout) cil managed" />
|
|
<MemberType>Method</MemberType>
|
|
<AssemblyInfo>
|
|
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
|
|
<AssemblyVersion>2.0.0.0</AssemblyVersion>
|
|
<AssemblyVersion>4.0.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ReturnValue>
|
|
<ReturnType>System.IO.WaitForChangedResult</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="changeType" Type="System.IO.WatcherChangeTypes" />
|
|
<Parameter Name="timeout" Type="System.Int32" />
|
|
</Parameters>
|
|
<Docs>
|
|
<remarks>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>This method waits until a change occurs or it has timed out. A value of -1 for the <paramref name="timeout" /> parameter means wait indefinitely.</para>
|
|
<block subset="none" type="note">
|
|
<para>This method allows an event handler to be invoked to respond to file changes even if the <see cref="P:System.IO.FileSystemWatcher.EnableRaisingEvents" /> property is set to false.</para>
|
|
</block>
|
|
<para>In some systems, <see cref="T:System.IO.FileSystemWatcher" /> reports changes to files using the short 8.3 file name format. For example, a change to "LongFileName.LongExtension" could be reported as "LongFi~.Lon".</para>
|
|
</remarks>
|
|
<summary>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>A synchronous method that returns a structure that contains specific information on the change that occurred, given the type of change you want to monitor and the time (in milliseconds) to wait before timing out.</para>
|
|
</summary>
|
|
<returns>
|
|
<attribution license="cc4" from="Microsoft" modified="false" />
|
|
<para>A <see cref="T:System.IO.WaitForChangedResult" /> that contains specific information on the change that occurred.</para>
|
|
</returns>
|
|
<param name="changeType">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.IO.WatcherChangeTypes" /> to watch for. </param>
|
|
<param name="timeout">
|
|
<attribution license="cc4" from="Microsoft" modified="false" />The time (in milliseconds) to wait before timing out. </param>
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type> |