Пример #1
0
		public OperaIndexer(OperaQueryable queryable, FileAttributesStore store, string root_dir)
		{
			this.attribute_store = store;
			this.queryable = queryable;
			this.cache_dirs = new ArrayList ();
			
			// Try to find all cache dirs
			foreach (string dir in DirectoryWalker.GetDirectories (root_dir)) {
				foreach (string file in DirectoryWalker.GetItems
					(dir, new DirectoryWalker.FileFilter (IsCacheFile))) {
					Inotify.Subscribe (dir, OnInotify, Inotify.EventType.MovedTo | Inotify.EventType.CloseWrite);
						cache_dirs.Add (dir);
				}
			}
		}
Пример #2
0
        public OperaIndexer(OperaQueryable queryable, FileAttributesStore store, string root_dir)
        {
            this.attribute_store = store;
            this.queryable       = queryable;
            this.cache_dirs      = new ArrayList();

            // Try to find all cache dirs
            foreach (string dir in DirectoryWalker.GetDirectories(root_dir))
            {
                foreach (string file in DirectoryWalker.GetItems
                             (dir, new DirectoryWalker.FileFilter(IsCacheFile)))
                {
                    Inotify.Subscribe(dir, OnInotify, Inotify.EventType.MovedTo | Inotify.EventType.CloseWrite);
                    cache_dirs.Add(dir);
                }
            }
        }