FileSystemEventArgs Class

Provides data for the directory events: Changed, Created, Deleted.

Syntax

Declaration

public class FileSystemEventArgs : EventArgs

Inheritance Hierarchy

Inherited Members

System.EventArgs

System.Object

, , , , , ,

Constructors summary

Initializes a new instance of the FileSystemEventArgs class.

Properties summary

Gets the type of directory event that occurred.

Gets the fully qualifed path of the affected file or directory.

Gets the name of the affected file or directory.

Constructors

  • FileSystemEventArgs(WatcherChangeTypes, String, String)

    Initializes a new instance of the FileSystemEventArgs class.

    public FileSystemEventArgs(WatcherChangeTypes changeType, string directory, string name)

    Parameters

    • changeType

      One of the WatcherChangeTypes values, which represents the kind of change detected in the file system.

    • directory

      The root directory of the affected file or directory.

    • name

      The name of the affected file or directory.

Properties

  • ChangeType

    Gets the type of directory event that occurred.

    public WatcherChangeTypes ChangeType { get; }

    Property Value

  • FullPath

    Gets the fully qualifed path of the affected file or directory.

    public string FullPath { get; }

    Property Value

    • The path of the affected file or directory.

  • Name

    Gets the name of the affected file or directory.

    public string Name { get; }

    Property Value

    • The name of the affected file or directory.

Details

Namespace

System.IO

Assembly

System.IO.FileSystem.Watcher.dll

See Also