Files
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

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: 0x020001FC RID: 508
[Token(Token = "0x20001FC")]
[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: 0x06000D20 RID: 3360 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D20")]
[Address(RVA = "0xDD1D50", Offset = "0xDD0D50", VA = "0x180DD1D50")]
public FileSystemWatcher(string path, string filter)
{
}
// Token: 0x06000D21 RID: 3361 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D21")]
[Address(RVA = "0xDD1530", Offset = "0xDD0530", VA = "0x180DD1530")]
private void InitWatcher()
{
}
// Token: 0x1700026D RID: 621
// (get) Token: 0x06000D22 RID: 3362 RVA: 0x00006CA8 File Offset: 0x00004EA8
// (set) Token: 0x06000D23 RID: 3363 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x1700026D")]
internal bool Waiting
{
[Token(Token = "0x6000D22")]
[Address(RVA = "0xCDF840", Offset = "0xCDE840", VA = "0x180CDF840")]
get
{
return default(bool);
}
[Token(Token = "0x6000D23")]
[Address(RVA = "0xCDDC60", Offset = "0xCDCC60", VA = "0x180CDDC60")]
set
{
}
}
// Token: 0x1700026E RID: 622
// (get) Token: 0x06000D24 RID: 3364 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x1700026E")]
internal string MangledFilter
{
[Token(Token = "0x6000D24")]
[Address(RVA = "0xDD2040", Offset = "0xDD1040", VA = "0x180DD2040")]
get
{
return null;
}
}
// Token: 0x1700026F RID: 623
// (get) Token: 0x06000D25 RID: 3365 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x1700026F")]
internal SearchPattern2 Pattern
{
[Token(Token = "0x6000D25")]
[Address(RVA = "0xDD20A0", Offset = "0xDD10A0", VA = "0x180DD20A0")]
get
{
return null;
}
}
// Token: 0x17000270 RID: 624
// (get) Token: 0x06000D26 RID: 3366 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x17000270")]
internal string FullPath
{
[Token(Token = "0x6000D26")]
[Address(RVA = "0xDD1FA0", Offset = "0xDD0FA0", VA = "0x180DD1FA0")]
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: 0x17000271 RID: 625
// (set) Token: 0x06000D27 RID: 3367 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x17000271")]
[IODescription("Flag to indicate if this instance is active")]
[DefaultValue(false)]
public bool EnableRaisingEvents
{
[Token(Token = "0x6000D27")]
[Address(RVA = "0xDD2210", Offset = "0xDD1210", VA = "0x180DD2210")]
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: 0x17000272 RID: 626
// (get) Token: 0x06000D28 RID: 3368 RVA: 0x00006CC0 File Offset: 0x00004EC0
[Token(Token = "0x17000272")]
[IODescription("Flag to indicate we want to watch subdirectories")]
[DefaultValue(false)]
public bool IncludeSubdirectories
{
[Token(Token = "0x6000D28")]
[Address(RVA = "0x417650", Offset = "0x416650", VA = "0x180417650")]
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: 0x17000273 RID: 627
// (set) Token: 0x06000D29 RID: 3369 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x17000273")]
[IODescription("Flag to indicate which change event we want to monitor")]
[Attribute(Name = "DefaultValueAttribute", RVA = "0x13EBC0", Offset = "0x13DFC0")]
public NotifyFilters NotifyFilter
{
[Token(Token = "0x6000D29")]
[Address(RVA = "0xDD2230", Offset = "0xDD1230", VA = "0x180DD2230")]
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: 0x17000274 RID: 628
// (get) Token: 0x06000D2A RID: 3370 RVA: 0x00002050 File Offset: 0x00000250
// (set) Token: 0x06000D2B RID: 3371 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x17000274")]
[Browsable(false)]
public override ISite Site
{
[Token(Token = "0x6000D2A")]
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "12")]
get
{
return null;
}
[Token(Token = "0x6000D2B")]
[Address(RVA = "0x4157F0", Offset = "0x4147F0", VA = "0x1804157F0", 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: 0x06000D2C RID: 3372 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D2C")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", 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: 0x06000D2D RID: 3373 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D2D")]
[Address(RVA = "0xDD1470", Offset = "0xDD0470", VA = "0x180DD1470", Slot = "14")]
protected override void Dispose(bool disposing)
{
}
// Token: 0x06000D2E RID: 3374 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D2E")]
[Address(RVA = "0xDD14B0", Offset = "0xDD04B0", VA = "0x180DD14B0", 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: 0x06000D2F RID: 3375 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D2F")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "17")]
public void EndInit()
{
}
// Token: 0x06000D30 RID: 3376 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D30")]
[Address(RVA = "0xDD18C0", Offset = "0xDD08C0", VA = "0x180DD18C0")]
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: 0x06000D31 RID: 3377 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D31")]
[Address(RVA = "0xDD1800", Offset = "0xDD0800", VA = "0x180DD1800")]
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: 0x06000D32 RID: 3378 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D32")]
[Address(RVA = "0xDD1830", Offset = "0xDD0830", VA = "0x180DD1830")]
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: 0x06000D33 RID: 3379 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D33")]
[Address(RVA = "0xDD1860", Offset = "0xDD0860", VA = "0x180DD1860")]
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: 0x06000D34 RID: 3380 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D34")]
[Address(RVA = "0xDD1890", Offset = "0xDD0890", VA = "0x180DD1890")]
protected void OnRenamed(RenamedEventArgs e)
{
}
// Token: 0x06000D35 RID: 3381 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D35")]
[Address(RVA = "0xDD1220", Offset = "0xDD0220", VA = "0x180DD1220")]
internal void DispatchEvents(FileAction act, string filename, ref RenamedEventArgs renamed)
{
}
// Token: 0x06000D36 RID: 3382 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D36")]
[Address(RVA = "0xDD1BF0", Offset = "0xDD0BF0", VA = "0x180DD1BF0")]
private void Start()
{
}
// Token: 0x06000D37 RID: 3383 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D37")]
[Address(RVA = "0xDD1C70", Offset = "0xDD0C70", VA = "0x180DD1C70")]
private void Stop()
{
}
/// <summary>Occurs when a file or directory in the specified <see cref="P:System.IO.FileSystemWatcher.Path" /> is changed.</summary>
// Token: 0x1400000F RID: 15
// (add) Token: 0x06000D38 RID: 3384 RVA: 0x00002053 File Offset: 0x00000253
// (remove) Token: 0x06000D39 RID: 3385 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x1400000F")]
public event FileSystemEventHandler Changed
{
[Token(Token = "0x6000D38")]
[Address(RVA = "0xDD1F00", Offset = "0xDD0F00", VA = "0x180DD1F00")]
[CompilerGenerated]
add
{
}
[Token(Token = "0x6000D39")]
[Address(RVA = "0xDD2170", Offset = "0xDD1170", VA = "0x180DD2170")]
[CompilerGenerated]
remove
{
}
}
// Token: 0x06000D3A RID: 3386 RVA: 0x00006CD8 File Offset: 0x00004ED8
[Token(Token = "0x6000D3A")]
[Address(RVA = "0x7249F0", Offset = "0x7239F0", VA = "0x1807249F0")]
private static int InternalSupportsFSW()
{
return 0;
}
// Token: 0x0400071E RID: 1822
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400071E")]
private bool enableRaisingEvents;
// Token: 0x0400071F RID: 1823
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400071F")]
private string filter;
// Token: 0x04000720 RID: 1824
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4000720")]
private bool includeSubdirectories;
// Token: 0x04000721 RID: 1825
[FieldOffset(Offset = "0x3C")]
[Token(Token = "0x4000721")]
private int internalBufferSize;
// Token: 0x04000722 RID: 1826
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4000722")]
private NotifyFilters notifyFilter;
// Token: 0x04000723 RID: 1827
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4000723")]
private string path;
// Token: 0x04000724 RID: 1828
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4000724")]
private string fullpath;
// Token: 0x04000725 RID: 1829
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x4000725")]
private ISynchronizeInvoke synchronizingObject;
// Token: 0x04000726 RID: 1830
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x4000726")]
private WaitForChangedResult lastData;
// Token: 0x04000727 RID: 1831
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x4000727")]
private bool waiting;
// Token: 0x04000728 RID: 1832
[FieldOffset(Offset = "0x88")]
[Token(Token = "0x4000728")]
private SearchPattern2 pattern;
// Token: 0x04000729 RID: 1833
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x4000729")]
private bool disposed;
// Token: 0x0400072A RID: 1834
[FieldOffset(Offset = "0x98")]
[Token(Token = "0x400072A")]
private string mangledFilter;
// Token: 0x0400072B RID: 1835
[Token(Token = "0x400072B")]
private static IFileWatcher watcher;
// Token: 0x0400072C RID: 1836
[Token(Token = "0x400072C")]
private static object lockobj;
// Token: 0x0400072E RID: 1838
[FieldOffset(Offset = "0xA8")]
[Token(Token = "0x400072E")]
[CompilerGenerated]
private FileSystemEventHandler Created;
// Token: 0x0400072F RID: 1839
[FieldOffset(Offset = "0xB0")]
[Token(Token = "0x400072F")]
[CompilerGenerated]
private FileSystemEventHandler Deleted;
// Token: 0x04000730 RID: 1840
[FieldOffset(Offset = "0xB8")]
[Token(Token = "0x4000730")]
[CompilerGenerated]
private ErrorEventHandler Error;
// Token: 0x04000731 RID: 1841
[FieldOffset(Offset = "0xC0")]
[Token(Token = "0x4000731")]
[CompilerGenerated]
private RenamedEventHandler Renamed;
// Token: 0x020001FD RID: 509
[Token(Token = "0x20001FD")]
private enum EventType
{
// Token: 0x04000733 RID: 1843
[Token(Token = "0x4000733")]
FileSystemEvent,
// Token: 0x04000734 RID: 1844
[Token(Token = "0x4000734")]
ErrorEvent,
// Token: 0x04000735 RID: 1845
[Token(Token = "0x4000735")]
RenameEvent
}
}
}