3 * Namespace: System.Web.Utils
\r
4 * Class: FileChangesMonitor
\r
6 * Author: Gaurav Vaish
\r
7 * Maintainer: gvaish@iitk.ac.in
\r
8 * Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>
\r
9 * Implementation: yes
\r
13 * (C) Gaurav Vaish (2001)
\r
19 using System.Runtime.InteropServices;
\r
20 using System.Collections;
\r
21 using System.Threading;
\r
23 namespace System.Web.Utils
\r
25 internal class FileChangesMonitor
\r
27 private static string BIN = "bin";
\r
28 private static string BINDIR = "bin/";
\r
29 private static int MAXLEN = 260;
\r
31 private FileChangeEventHandler cbRename;
\r
32 private NativeFileChangeEventHandler cbSubDirs;
\r
34 private int monitoredSubdirs;
\r
35 private string rootDir;
\r
36 private Hashtable allDirs;
\r
37 private GCHandle rootcbSubDirs;
\r
39 private ReaderWriterLock rwLock;
\r
41 public FileChangesMonitor()
\r
43 allDirs = new Hashtable(WebHashCodeProvider.Default, WebEqualComparer.Default);
\r
44 rwLock = new ReaderWriterLock();
\r
47 /// <param name="file">Name of the file</param>
\r
48 /// <param name="mTime">Last modification date</param>
\r
49 /// <param name="length">Legnth of the file</param>
\r
50 public void GetFileAttributes(string file, out DateTime mTime, long length)
\r
52 if(!Path.IsPathRooted(file))
\r
54 throw new HttpException(HttpRuntime.FormatResourceString("Path_must_be_rooted"));
\r
56 // TODO: finish this
\r
57 mTime = DateTime.Now;
\r
58 throw new NotImplementedException();
\r