C# Class System.IO.FileSystemWatcher

Inheritance: Component, ISupportInitialize
显示文件 Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
BeginInit ( ) : void
EndInit ( ) : void
FileSystemWatcher ( )
FileSystemWatcher ( string path )
FileSystemWatcher ( string path, string filter )
FileSystemWatcher ( string path ) : System.ComponentModel
FileSystemWatcher ( string path, string filter ) : System.ComponentModel
WaitForChanged ( System changeType ) : System.IO.WaitForChangedResult
WaitForChanged ( System changeType, int timeout ) : System.IO.WaitForChangedResult
WaitForChanged ( WatcherChangeTypes changeType ) : WaitForChangedResult
WaitForChanged ( WatcherChangeTypes changeType, int timeout ) : WaitForChangedResult

Protected Methods

Method Description
Dispose ( bool disposing ) : void
OnChanged ( System e ) : void
OnCreated ( System e ) : void
OnDeleted ( System e ) : void
OnError ( System e ) : void
OnRenamed ( System e ) : void

Private Methods

Method Description
AllocateBuffer ( ) : byte[]

Allocates a buffer of the requested internal buffer size.

FileSystemWatcher ( ) : System.ComponentModel
InvokeOn ( FileSystemEventArgs e, FileSystemEventHandler handler ) : void
IsHandleInvalid ( System.IO.SafeFileHandle handle ) : bool
IsSuspended ( ) : bool
MatchPattern ( string relativePath ) : bool
Monitor ( AsyncReadState state ) : void

Initiates the next asynchronous read operation if monitoring is still desired. If the directory handle has been closed due to an error or due to event monitoring being disabled, this cleans up state associated with the operation.

NotifyFileSystemEventArgs ( WatcherChangeTypes changeType, string name ) : void
NotifyInternalBufferOverflowEvent ( ) : void
NotifyRenameEventArgs ( WatcherChangeTypes action, string name, string oldName ) : void
OnChanged ( FileSystemEventArgs e ) : void
OnCreated ( FileSystemEventArgs e ) : void
OnDeleted ( FileSystemEventArgs e ) : void
OnError ( ErrorEventArgs e ) : void
OnRenamed ( RenamedEventArgs e ) : void
ParseEventBufferAndNotifyForEach ( byte buffer ) : void
ReadDirectoryChangesCallback ( uint errorCode, uint numBytes, NativeOverlapped overlappedPointer ) : void

Callback invoked when an asynchronous read on the directory handle completes.

ReadMaxUserLimit ( string path ) : string

Reads the value of a max user limit path from procfs.

Restart ( ) : void
StartRaisingEventsIfNotDisposed ( ) : void
TranslateFilters ( NotifyFilters filters ) : Interop.Sys.NotifyEvents

Maps the FileSystemWatcher's NotifyFilters enumeration to the corresponding Interop.Sys.NotifyEvents values.

Method Details

BeginInit() public method

public BeginInit ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndInit() public method

public EndInit ( ) : void
return void

FileSystemWatcher() public method

public FileSystemWatcher ( )

FileSystemWatcher() public method

public FileSystemWatcher ( string path )
path string

FileSystemWatcher() public method

public FileSystemWatcher ( string path, string filter )
path string
filter string

FileSystemWatcher() public method

public FileSystemWatcher ( string path ) : System.ComponentModel
path string
return System.ComponentModel

FileSystemWatcher() public method

public FileSystemWatcher ( string path, string filter ) : System.ComponentModel
path string
filter string
return System.ComponentModel

OnChanged() protected method

protected OnChanged ( System e ) : void
e System
return void

OnCreated() protected method

protected OnCreated ( System e ) : void
e System
return void

OnDeleted() protected method

protected OnDeleted ( System e ) : void
e System
return void

OnError() protected method

protected OnError ( System e ) : void
e System
return void

OnRenamed() protected method

protected OnRenamed ( System e ) : void
e System
return void

WaitForChanged() public method

public WaitForChanged ( System changeType ) : System.IO.WaitForChangedResult
changeType System
return System.IO.WaitForChangedResult

WaitForChanged() public method

public WaitForChanged ( System changeType, int timeout ) : System.IO.WaitForChangedResult
changeType System
timeout int
return System.IO.WaitForChangedResult

WaitForChanged() public method

public WaitForChanged ( WatcherChangeTypes changeType ) : WaitForChangedResult
changeType WatcherChangeTypes
return WaitForChangedResult

WaitForChanged() public method

public WaitForChanged ( WatcherChangeTypes changeType, int timeout ) : WaitForChangedResult
changeType WatcherChangeTypes
timeout int
return WaitForChangedResult