2
0

FileChangesMonitor.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. *
  3. * Namespace: System.Web.Util
  4. * Class: FileChangesMonitor
  5. *
  6. * Author: Gaurav Vaish
  7. * Maintainer: [email protected]
  8. * Contact: <[email protected]>, <[email protected]>
  9. * Implementation: yes
  10. * Status: ??%
  11. *
  12. *
  13. * (C) Gaurav Vaish (2001)
  14. */
  15. using System;
  16. using System.IO;
  17. using System.Web;
  18. using System.Runtime.InteropServices;
  19. using System.Collections;
  20. using System.Threading;
  21. namespace System.Web.Util
  22. {
  23. internal class FileChangesMonitor
  24. {
  25. private static string BIN = "bin";
  26. private static string BINDIR = "bin/";
  27. private static int MAXLEN = 260;
  28. private FileChangeEventHandler cbRename;
  29. private NativeFileChangeEventHandler cbSubDirs;
  30. private int monitoredSubdirs;
  31. private string rootDir;
  32. private Hashtable allDirs;
  33. private GCHandle rootcbSubDirs;
  34. private ReaderWriterLock rwLock;
  35. public FileChangesMonitor()
  36. {
  37. allDirs = new Hashtable(WebHashCodeProvider.Default, WebEqualComparer.Default);
  38. rwLock = new ReaderWriterLock();
  39. }
  40. /// <param name="file">Name of the file</param>
  41. /// <param name="mTime">Last modification date</param>
  42. /// <param name="length">Legnth of the file</param>
  43. [MonoTODO]
  44. public void GetFileAttributes(string file, out DateTime mTime, long length)
  45. {
  46. if(!Path.IsPathRooted(file))
  47. {
  48. throw new HttpException(HttpRuntime.FormatResourceString("Path_must_be_rooted"));
  49. }
  50. // TODO: finish this
  51. mTime = DateTime.Now;
  52. throw new NotImplementedException();
  53. }
  54. }
  55. }