417 lines
15 KiB
C#
417 lines
15 KiB
C#
using System;
|
|
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace System.IO
|
|
{
|
|
/// <summary>Listens to the file system change notifications and raises events when a directory, or file in a directory, changes.</summary>
|
|
// Token: 0x02000200 RID: 512
|
|
[Token(Token = "0x2000200")]
|
|
[DefaultEvent("Changed")]
|
|
[IODescription("")]
|
|
public class FileSystemWatcher : Component, ISupportInitialize
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.IO.FileSystemWatcher" /> class, given the specified directory and type of files to monitor.</summary>
|
|
/// <param name="path">The directory to monitor, in standard or Universal Naming Convention (UNC) notation.</param>
|
|
/// <param name="filter">The type of files to watch. For example, "*.txt" watches for changes to all text files.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">The <paramref name="path" /> parameter is <see langword="null" />.
|
|
/// -or-
|
|
/// The <paramref name="filter" /> parameter is <see langword="null" />.</exception>
|
|
/// <exception cref="T:System.ArgumentException">The <paramref name="path" /> parameter is an empty string ("").
|
|
/// -or-
|
|
/// The path specified through the <paramref name="path" /> parameter does not exist.</exception>
|
|
/// <exception cref="T:System.IO.PathTooLongException">
|
|
/// <paramref name="path" /> is too long.</exception>
|
|
// Token: 0x06000D36 RID: 3382 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D36")]
|
|
[Address(RVA = "0x29E4630", Offset = "0x29E3430", VA = "0x1829E4630")]
|
|
public FileSystemWatcher(string path, string filter)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D37 RID: 3383 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D37")]
|
|
[Address(RVA = "0x29E3E10", Offset = "0x29E2C10", VA = "0x1829E3E10")]
|
|
private void InitWatcher()
|
|
{
|
|
}
|
|
|
|
// Token: 0x17000271 RID: 625
|
|
// (get) Token: 0x06000D38 RID: 3384 RVA: 0x00006CC0 File Offset: 0x00004EC0
|
|
// (set) Token: 0x06000D39 RID: 3385 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x17000271")]
|
|
internal bool Waiting
|
|
{
|
|
[Token(Token = "0x6000D38")]
|
|
[Address(RVA = "0x536440", Offset = "0x535240", VA = "0x180536440")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
[Token(Token = "0x6000D39")]
|
|
[Address(RVA = "0x536B70", Offset = "0x535970", VA = "0x180536B70")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000272 RID: 626
|
|
// (get) Token: 0x06000D3A RID: 3386 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000272")]
|
|
internal string MangledFilter
|
|
{
|
|
[Token(Token = "0x6000D3A")]
|
|
[Address(RVA = "0x29E4920", Offset = "0x29E3720", VA = "0x1829E4920")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000273 RID: 627
|
|
// (get) Token: 0x06000D3B RID: 3387 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000273")]
|
|
internal SearchPattern2 Pattern
|
|
{
|
|
[Token(Token = "0x6000D3B")]
|
|
[Address(RVA = "0x29E4980", Offset = "0x29E3780", VA = "0x1829E4980")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17000274 RID: 628
|
|
// (get) Token: 0x06000D3C RID: 3388 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x17000274")]
|
|
internal string FullPath
|
|
{
|
|
[Token(Token = "0x6000D3C")]
|
|
[Address(RVA = "0x29E4880", Offset = "0x29E3680", VA = "0x1829E4880")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a value indicating whether the component is enabled.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if the component is enabled; otherwise, <see langword="false" />. The default is <see langword="false" />. If you are using the component on a designer in Visual Studio 2005, the default is <see langword="true" />.</returns>
|
|
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.FileSystemWatcher" /> object has been disposed.</exception>
|
|
/// <exception cref="T:System.PlatformNotSupportedException">The current operating system is not Microsoft Windows NT or later.</exception>
|
|
/// <exception cref="T:System.IO.FileNotFoundException">The directory specified in <see cref="P:System.IO.FileSystemWatcher.Path" /> could not be found.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <see cref="P:System.IO.FileSystemWatcher.Path" /> has not been set or is invalid.</exception>
|
|
// Token: 0x17000275 RID: 629
|
|
// (set) Token: 0x06000D3D RID: 3389 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x17000275")]
|
|
[DefaultValue(false)]
|
|
[IODescription("Flag to indicate if this instance is active")]
|
|
public bool EnableRaisingEvents
|
|
{
|
|
[Token(Token = "0x6000D3D")]
|
|
[Address(RVA = "0x29E4AF0", Offset = "0x29E38F0", VA = "0x1829E4AF0")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets a value indicating whether subdirectories within the specified path should be monitored.</summary>
|
|
/// <returns>
|
|
/// <see langword="true" /> if you want to monitor subdirectories; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns>
|
|
// Token: 0x17000276 RID: 630
|
|
// (get) Token: 0x06000D3E RID: 3390 RVA: 0x00006CD8 File Offset: 0x00004ED8
|
|
[Token(Token = "0x17000276")]
|
|
[DefaultValue(false)]
|
|
[IODescription("Flag to indicate we want to watch subdirectories")]
|
|
public bool IncludeSubdirectories
|
|
{
|
|
[Token(Token = "0x6000D3E")]
|
|
[Address(RVA = "0x43A970", Offset = "0x439770", VA = "0x18043A970")]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets the type of changes to watch for.</summary>
|
|
/// <returns>One of the <see cref="T:System.IO.NotifyFilters" /> values. The default is the bitwise OR combination of <see langword="LastWrite" />, <see langword="FileName" />, and <see langword="DirectoryName" />.</returns>
|
|
/// <exception cref="T:System.ArgumentException">The value is not a valid bitwise OR combination of the <see cref="T:System.IO.NotifyFilters" /> values.</exception>
|
|
/// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The value that is being set is not valid.</exception>
|
|
// Token: 0x17000277 RID: 631
|
|
// (set) Token: 0x06000D3F RID: 3391 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x17000277")]
|
|
[Attribute(Name = "DefaultValueAttribute", RVA = "0xAAD00", Offset = "0xAA100")]
|
|
[IODescription("Flag to indicate which change event we want to monitor")]
|
|
public NotifyFilters NotifyFilter
|
|
{
|
|
[Token(Token = "0x6000D3F")]
|
|
[Address(RVA = "0x29E4B10", Offset = "0x29E3910", VA = "0x1829E4B10")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets or sets an <see cref="T:System.ComponentModel.ISite" /> for the <see cref="T:System.IO.FileSystemWatcher" />.</summary>
|
|
/// <returns>An <see cref="T:System.ComponentModel.ISite" /> for the <see cref="T:System.IO.FileSystemWatcher" />.</returns>
|
|
// Token: 0x17000278 RID: 632
|
|
// (get) Token: 0x06000D40 RID: 3392 RVA: 0x00002050 File Offset: 0x00000250
|
|
// (set) Token: 0x06000D41 RID: 3393 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x17000278")]
|
|
[Browsable(false)]
|
|
public override ISite Site
|
|
{
|
|
[Token(Token = "0x6000D40")]
|
|
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "12")]
|
|
get
|
|
{
|
|
return null;
|
|
}
|
|
[Token(Token = "0x6000D41")]
|
|
[Address(RVA = "0x3F7210", Offset = "0x3F6010", VA = "0x1803F7210", Slot = "13")]
|
|
set
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
// Token: 0x06000D42 RID: 3394 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D42")]
|
|
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "16")]
|
|
public void BeginInit()
|
|
{
|
|
}
|
|
|
|
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.FileSystemWatcher" /> and optionally releases the managed resources.</summary>
|
|
/// <param name="disposing">
|
|
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
|
|
// Token: 0x06000D43 RID: 3395 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D43")]
|
|
[Address(RVA = "0x29E3D50", Offset = "0x29E2B50", VA = "0x1829E3D50", Slot = "14")]
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D44 RID: 3396 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D44")]
|
|
[Address(RVA = "0x29E3D90", Offset = "0x29E2B90", VA = "0x1829E3D90", Slot = "1")]
|
|
protected override void Finalize()
|
|
{
|
|
}
|
|
|
|
/// <summary>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.</summary>
|
|
// Token: 0x06000D45 RID: 3397 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D45")]
|
|
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "17")]
|
|
public void EndInit()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D46 RID: 3398 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D46")]
|
|
[Address(RVA = "0x29E41A0", Offset = "0x29E2FA0", VA = "0x1829E41A0")]
|
|
private void RaiseEvent(Delegate ev, EventArgs arg, FileSystemWatcher.EventType evtype)
|
|
{
|
|
}
|
|
|
|
/// <summary>Raises the <see cref="E:System.IO.FileSystemWatcher.Changed" /> event.</summary>
|
|
/// <param name="e">A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data.</param>
|
|
// Token: 0x06000D47 RID: 3399 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D47")]
|
|
[Address(RVA = "0x29E40E0", Offset = "0x29E2EE0", VA = "0x1829E40E0")]
|
|
protected void OnChanged(FileSystemEventArgs e)
|
|
{
|
|
}
|
|
|
|
/// <summary>Raises the <see cref="E:System.IO.FileSystemWatcher.Created" /> event.</summary>
|
|
/// <param name="e">A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data.</param>
|
|
// Token: 0x06000D48 RID: 3400 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D48")]
|
|
[Address(RVA = "0x29E4110", Offset = "0x29E2F10", VA = "0x1829E4110")]
|
|
protected void OnCreated(FileSystemEventArgs e)
|
|
{
|
|
}
|
|
|
|
/// <summary>Raises the <see cref="E:System.IO.FileSystemWatcher.Deleted" /> event.</summary>
|
|
/// <param name="e">A <see cref="T:System.IO.FileSystemEventArgs" /> that contains the event data.</param>
|
|
// Token: 0x06000D49 RID: 3401 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D49")]
|
|
[Address(RVA = "0x29E4140", Offset = "0x29E2F40", VA = "0x1829E4140")]
|
|
protected void OnDeleted(FileSystemEventArgs e)
|
|
{
|
|
}
|
|
|
|
/// <summary>Raises the <see cref="E:System.IO.FileSystemWatcher.Renamed" /> event.</summary>
|
|
/// <param name="e">A <see cref="T:System.IO.RenamedEventArgs" /> that contains the event data.</param>
|
|
// Token: 0x06000D4A RID: 3402 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D4A")]
|
|
[Address(RVA = "0x29E4170", Offset = "0x29E2F70", VA = "0x1829E4170")]
|
|
protected void OnRenamed(RenamedEventArgs e)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D4B RID: 3403 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D4B")]
|
|
[Address(RVA = "0x29E3B00", Offset = "0x29E2900", VA = "0x1829E3B00")]
|
|
internal void DispatchEvents(FileAction act, string filename, ref RenamedEventArgs renamed)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D4C RID: 3404 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D4C")]
|
|
[Address(RVA = "0x29E44D0", Offset = "0x29E32D0", VA = "0x1829E44D0")]
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06000D4D RID: 3405 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x6000D4D")]
|
|
[Address(RVA = "0x29E4550", Offset = "0x29E3350", VA = "0x1829E4550")]
|
|
private void Stop()
|
|
{
|
|
}
|
|
|
|
/// <summary>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is changed.</summary>
|
|
// Token: 0x14000010 RID: 16
|
|
// (add) Token: 0x06000D4E RID: 3406 RVA: 0x00002053 File Offset: 0x00000253
|
|
// (remove) Token: 0x06000D4F RID: 3407 RVA: 0x00002053 File Offset: 0x00000253
|
|
[Token(Token = "0x14000010")]
|
|
public event FileSystemEventHandler Changed
|
|
{
|
|
[Token(Token = "0x6000D4E")]
|
|
[Address(RVA = "0x29E47E0", Offset = "0x29E35E0", VA = "0x1829E47E0")]
|
|
[CompilerGenerated]
|
|
add
|
|
{
|
|
}
|
|
[Token(Token = "0x6000D4F")]
|
|
[Address(RVA = "0x29E4A50", Offset = "0x29E3850", VA = "0x1829E4A50")]
|
|
[CompilerGenerated]
|
|
remove
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000D50 RID: 3408 RVA: 0x00006CF0 File Offset: 0x00004EF0
|
|
[Token(Token = "0x6000D50")]
|
|
[Address(RVA = "0x1E94E50", Offset = "0x1E93C50", VA = "0x181E94E50")]
|
|
private static int InternalSupportsFSW()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x0400072B RID: 1835
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400072B")]
|
|
private bool enableRaisingEvents;
|
|
|
|
// Token: 0x0400072C RID: 1836
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400072C")]
|
|
private string filter;
|
|
|
|
// Token: 0x0400072D RID: 1837
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400072D")]
|
|
private bool includeSubdirectories;
|
|
|
|
// Token: 0x0400072E RID: 1838
|
|
[FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x400072E")]
|
|
private int internalBufferSize;
|
|
|
|
// Token: 0x0400072F RID: 1839
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400072F")]
|
|
private NotifyFilters notifyFilter;
|
|
|
|
// Token: 0x04000730 RID: 1840
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4000730")]
|
|
private string path;
|
|
|
|
// Token: 0x04000731 RID: 1841
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4000731")]
|
|
private string fullpath;
|
|
|
|
// Token: 0x04000732 RID: 1842
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4000732")]
|
|
private ISynchronizeInvoke synchronizingObject;
|
|
|
|
// Token: 0x04000733 RID: 1843
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4000733")]
|
|
private WaitForChangedResult lastData;
|
|
|
|
// Token: 0x04000734 RID: 1844
|
|
[FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x4000734")]
|
|
private bool waiting;
|
|
|
|
// Token: 0x04000735 RID: 1845
|
|
[FieldOffset(Offset = "0x88")]
|
|
[Token(Token = "0x4000735")]
|
|
private SearchPattern2 pattern;
|
|
|
|
// Token: 0x04000736 RID: 1846
|
|
[FieldOffset(Offset = "0x90")]
|
|
[Token(Token = "0x4000736")]
|
|
private bool disposed;
|
|
|
|
// Token: 0x04000737 RID: 1847
|
|
[FieldOffset(Offset = "0x98")]
|
|
[Token(Token = "0x4000737")]
|
|
private string mangledFilter;
|
|
|
|
// Token: 0x04000738 RID: 1848
|
|
[Token(Token = "0x4000738")]
|
|
private static IFileWatcher watcher;
|
|
|
|
// Token: 0x04000739 RID: 1849
|
|
[Token(Token = "0x4000739")]
|
|
private static object lockobj;
|
|
|
|
// Token: 0x0400073B RID: 1851
|
|
[FieldOffset(Offset = "0xA8")]
|
|
[Token(Token = "0x400073B")]
|
|
[CompilerGenerated]
|
|
private FileSystemEventHandler Created;
|
|
|
|
// Token: 0x0400073C RID: 1852
|
|
[FieldOffset(Offset = "0xB0")]
|
|
[Token(Token = "0x400073C")]
|
|
[CompilerGenerated]
|
|
private FileSystemEventHandler Deleted;
|
|
|
|
// Token: 0x0400073D RID: 1853
|
|
[FieldOffset(Offset = "0xB8")]
|
|
[Token(Token = "0x400073D")]
|
|
[CompilerGenerated]
|
|
private ErrorEventHandler Error;
|
|
|
|
// Token: 0x0400073E RID: 1854
|
|
[FieldOffset(Offset = "0xC0")]
|
|
[Token(Token = "0x400073E")]
|
|
[CompilerGenerated]
|
|
private RenamedEventHandler Renamed;
|
|
|
|
// Token: 0x02000201 RID: 513
|
|
[Token(Token = "0x2000201")]
|
|
private enum EventType
|
|
{
|
|
// Token: 0x04000740 RID: 1856
|
|
[Token(Token = "0x4000740")]
|
|
FileSystemEvent,
|
|
// Token: 0x04000741 RID: 1857
|
|
[Token(Token = "0x4000741")]
|
|
ErrorEvent,
|
|
// Token: 0x04000742 RID: 1858
|
|
[Token(Token = "0x4000742")]
|
|
RenameEvent
|
|
}
|
|
}
|
|
}
|