FileSystemEventArgs.cs 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // System.IO.FileSystemEventArgs.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System;
  10. namespace System.IO {
  11. public class FileSystemEventArgs : EventArgs {
  12. #region Fields
  13. WatcherChangeTypes changeType;
  14. string directory;
  15. string name;
  16. #endregion // Fields
  17. #region Constructors
  18. public FileSystemEventArgs (WatcherChangeTypes changeType, string directory, string name)
  19. {
  20. this.changeType = changeType;
  21. this.directory = directory;
  22. this.name = name;
  23. }
  24. internal void SetName (string name)
  25. {
  26. this.name = name;
  27. }
  28. #endregion // Constructors
  29. #region Properties
  30. public WatcherChangeTypes ChangeType {
  31. get { return changeType; }
  32. }
  33. public string FullPath {
  34. get { return Path.Combine (directory, name); }
  35. }
  36. public string Name {
  37. get { return name; }
  38. }
  39. #endregion // Properties
  40. }
  41. }