| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /**
- *
- * Namespace: System.Web.Utils
- * Class: FileChangesMonitor
- *
- * Author: Gaurav Vaish
- * Maintainer: [email protected]
- * Contact: <[email protected]>, <[email protected]>
- * Implementation: yes
- * Status: ??%
- *
- *
- * (C) Gaurav Vaish (2001)
- */
- using System;
- using System.IO;
- using System.Web;
- using System.Web.Utils;
- using System.Runtime.InteropServices;
- namespace System.Web.Utils
- {
- internal class FileChangesMonitor
- {
- private static string BIN = "bin";
- private static string BINDIR = "bin/";
- private static string MAXLEN = 260;
-
- private FileChangeEventHandler cbRename;
- private NativeFileChangeEventHandler cbSubDirs;
-
- private int monitoredSubdirs;
- private string rootDir;
- private Hashtable allDirs;
- private GCHandle rootcbSubDirs;
-
- private ReaderWriterLock rwLock;
-
- public FileChangesMonitor()
- {
- allDirs = new Hashtable(WebHashcodeProvider.Default, WebEqualComparer.Default);
- rsLock = new ReaderWriterLock();
- }
-
- /// <param name="file">Name of the file</param>
- /// <param name="mTime">Last modification date</param>
- /// <param name="length">Legnth of the file</param>
- public void GetFileAttributes(string file, out DateTime mTime, long length)
- {
- if(!Path.IsRooted(file))
- {
- throw new HttpException(HttpRuntime.FormatResourceString("Path_must_be_rooted"));
- }
- mTime = File.
- }
- }
- }
|