亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? directory.cs

?? 介紹有關全文檢索的類庫,以lucene為例,在.net環境下實現多種類型文檔的全文檢索.
?? CS
字號:
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

using System;

namespace Lucene.Net.Store
{
	
	/// <summary>A Directory is a flat list of files.  Files may be written once, when they
	/// are created.  Once a file is created it may only be opened for read, or
	/// deleted.  Random access is permitted both when reading and writing.
	/// 
	/// <p> Java's i/o APIs not used directly, but rather all i/o is
	/// through this API.  This permits things such as: <ul>
	/// <li> implementation of RAM-based indices;
	/// <li> implementation indices stored in a database, via JDBC;
	/// <li> implementation of an index as a single file;
	/// </ul>
	/// 
	/// Directory locking is implemented by an instance of {@link
	/// LockFactory}, and can be changed for each Directory
	/// instance using {@link #setLockFactory}.
	/// 
	/// </summary>
	/// <author>  Doug Cutting
	/// </author>
	[Serializable]
	public abstract class Directory
	{
		
		/// <summary>Holds the LockFactory instance (implements locking for
		/// this Directory instance). 
		/// </summary>
		[NonSerialized]
		protected internal LockFactory lockFactory;
		
		/// <summary>Returns an array of strings, one for each file in the directory. </summary>
		public abstract System.String[] List();
		
		/// <summary>Returns true iff a file with the given name exists. </summary>
		public abstract bool FileExists(System.String name);
		
		/// <summary>Returns the time the named file was last modified. </summary>
		public abstract long FileModified(System.String name);
		
		/// <summary>Set the modified time of an existing file to now. </summary>
		public abstract void  TouchFile(System.String name);
		
		/// <summary>Removes an existing file in the directory. </summary>
		public abstract void  DeleteFile(System.String name);
		
		/// <summary>Renames an existing file in the directory.
		/// If a file already exists with the new name, then it is replaced.
		/// This replacement is not guaranteed to be atomic.
		/// </summary>
		/// <deprecated> 
		/// </deprecated>
		public abstract void  RenameFile(System.String from, System.String to);
		
		/// <summary>Returns the length of a file in the directory. </summary>
		public abstract long FileLength(System.String name);
		
		
		/// <summary>Creates a new, empty file in the directory with the given name.
		/// Returns a stream writing this file. 
		/// </summary>
		public abstract IndexOutput CreateOutput(System.String name);
		
		
		/// <summary>Returns a stream reading an existing file. </summary>
		public abstract IndexInput OpenInput(System.String name);
		
		/// <summary>Construct a {@link Lock}.</summary>
		/// <param name="name">the name of the lock file
		/// </param>
		public virtual Lock MakeLock(System.String name)
		{
			return lockFactory.MakeLock(name);
		}
		/// <summary> Attempt to clear (forcefully unlock and remove) the
		/// specified lock.  Only call this at a time when you are
		/// certain this lock is no longer in use.
		/// </summary>
		/// <param name="lockName">name of the lock to be cleared.
		/// </param>
		public virtual void  ClearLock(System.String name)
		{
			if (lockFactory != null)
			{
				lockFactory.ClearLock(name);
			}
		}
		
		/// <summary>Closes the store. </summary>
		public abstract void  Close();
		
		/// <summary> Set the LockFactory that this Directory instance should
		/// use for its locking implementation.  Each * instance of
		/// LockFactory should only be used for one directory (ie,
		/// do not share a single instance across multiple
		/// Directories).
		/// 
		/// </summary>
		/// <param name="lockFactory">instance of {@link LockFactory}.
		/// </param>
		public virtual void  SetLockFactory(LockFactory lockFactory)
		{
			this.lockFactory = lockFactory;
			lockFactory.SetLockPrefix(this.GetLockID());
		}
		
		/// <summary> Get the LockFactory that this Directory instance is
		/// using for its locking implementation.  Note that this
		/// may be null for Directory implementations that provide
		/// their own locking implementation.
		/// </summary>
		public virtual LockFactory GetLockFactory()
		{
			return this.lockFactory;
		}
		
		/// <summary> Return a string identifier that uniquely differentiates
		/// this Directory instance from other Directory instances.
		/// This ID should be the same if two Directory instances
		/// (even in different JVMs and/or on different machines)
		/// are considered "the same index".  This is how locking
		/// "scopes" to the right index.
		/// </summary>
		public virtual System.String GetLockID()
		{
			return this.ToString();
		}
		
		/// <summary> Copy contents of a directory src to a directory dest.
		/// If a file in src already exists in dest then the
		/// one in dest will be blindly overwritten.
		/// 
		/// </summary>
		/// <param name="src">source directory
		/// </param>
		/// <param name="dest">destination directory
		/// </param>
		/// <param name="closeDirSrc">if <code>true</code>, call {@link #close()} method on source directory
		/// </param>
		/// <throws>  IOException </throws>
		public static void  Copy(Directory src, Directory dest, bool closeDirSrc)
		{
			System.String[] files = src.List();
			byte[] buf = new byte[BufferedIndexOutput.BUFFER_SIZE];
			for (int i = 0; i < files.Length; i++)
			{
				IndexOutput os = null;
				IndexInput is_Renamed = null;
				try
				{
					// create file in dest directory
					os = dest.CreateOutput(files[i]);
					// read current file
					is_Renamed = src.OpenInput(files[i]);
					// and copy to dest directory
					long len = is_Renamed.Length();
					long readCount = 0;
					while (readCount < len)
					{
						int toRead = readCount + BufferedIndexOutput.BUFFER_SIZE > len?(int) (len - readCount):BufferedIndexOutput.BUFFER_SIZE;
						is_Renamed.ReadBytes(buf, 0, toRead);
						os.WriteBytes(buf, toRead);
						readCount += toRead;
					}
				}
				finally
				{
					// graceful cleanup
					try
					{
						if (os != null)
							os.Close();
					}
					finally
					{
						if (is_Renamed != null)
							is_Renamed.Close();
					}
				}
			}
			if (closeDirSrc)
				src.Close();
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91猫先生在线| 国产麻豆一精品一av一免费| 99视频在线精品| 亚洲免费在线视频| 欧美亚洲图片小说| 日韩精品电影在线| 国产亚洲精品7777| 97久久超碰国产精品| 亚洲影视资源网| 7878成人国产在线观看| 九九久久精品视频| 中文字幕第一区| 99视频在线观看一区三区| 一区二区视频免费在线观看| 欧美一区二区在线视频| 国产一区二区三区av电影| 国产精品久久久爽爽爽麻豆色哟哟| 99麻豆久久久国产精品免费优播| 亚洲国产日韩精品| 精品88久久久久88久久久| 成人性生交大片免费看视频在线| 一区二区三区在线视频免费观看| 6080国产精品一区二区| 国产成人精品亚洲午夜麻豆| 亚洲精品欧美激情| 久久新电视剧免费观看| 欧洲一区二区av| 激情小说欧美图片| 亚洲综合色网站| 久久色在线观看| 欧洲另类一二三四区| 国产一区二区免费在线| 亚洲午夜激情网站| 欧美极品少妇xxxxⅹ高跟鞋| 91麻豆精品久久久久蜜臀| 丁香亚洲综合激情啪啪综合| 肉肉av福利一精品导航| 综合婷婷亚洲小说| 精品久久一区二区三区| 欧美艳星brazzers| 国产成人在线视频网站| 天天av天天翘天天综合网色鬼国产| 中文字幕在线一区免费| 26uuu亚洲综合色| 欧美日韩国产电影| 99精品在线观看视频| 国内精品伊人久久久久影院对白| 亚洲综合另类小说| 中文子幕无线码一区tr| 日韩精品一区在线观看| 欧美三级三级三级| 91社区在线播放| 岛国精品在线播放| 国产一区二区免费在线| 久久精品噜噜噜成人av农村| 亚洲一区二区美女| 亚洲精品国产高清久久伦理二区| 国产精品视频一二三| 久久综合九色综合97婷婷女人 | 91小宝寻花一区二区三区| 精品无码三级在线观看视频| 亚洲成av人片在www色猫咪| 亚洲欧美日韩电影| 国产精品福利一区二区| 国产三区在线成人av| 欧美精品一区二区在线播放| 欧美一卡二卡在线观看| 欧美日韩另类国产亚洲欧美一级| 一本色道久久综合狠狠躁的推荐 | 亚洲国产视频一区| 亚洲欧美一区二区三区极速播放| 日本一区二区免费在线观看视频| 精品欧美一区二区在线观看| 日韩欧美色电影| 日韩一区二区电影网| 日韩手机在线导航| 日韩一区和二区| 精品美女一区二区| 久久久久久亚洲综合| 久久蜜桃香蕉精品一区二区三区| 日韩欧美一级片| 精品久久久三级丝袜| 久久亚洲精品国产精品紫薇| 国产欧美在线观看一区| 国产精品激情偷乱一区二区∴| 国产精品伦理一区二区| 国产精品久久久久一区二区三区 | 成人精品在线视频观看| 成人精品视频一区二区三区尤物| aa级大片欧美| 欧美色窝79yyyycom| 在线91免费看| 日韩一级精品视频在线观看| 精品国产成人系列| 国产女主播一区| 伊人色综合久久天天| 婷婷综合另类小说色区| 蜜臀a∨国产成人精品| 国产精品一区专区| 91网上在线视频| 欧美日韩另类国产亚洲欧美一级| 精品三级在线观看| 国产精品久久久一区麻豆最新章节| 亚洲激情五月婷婷| 日韩精品亚洲专区| 成人在线综合网| 欧美美女网站色| 久久久久久久久97黄色工厂| 亚洲乱码中文字幕综合| 日韩va欧美va亚洲va久久| 国产精品一二三区在线| 91福利视频久久久久| 日韩欧美精品在线视频| 国产精品五月天| 午夜精品久久久久久久久| 国产在线视频不卡二| 91猫先生在线| 久久综合色之久久综合| 亚洲精品中文在线观看| 经典三级视频一区| 色视频欧美一区二区三区| 日韩视频免费观看高清完整版| 国产精品国产自产拍高清av王其| 亚洲v精品v日韩v欧美v专区| 风间由美一区二区av101| 欧美日韩电影在线| 中文天堂在线一区| 奇米影视一区二区三区| 99精品国产视频| 亚洲精品在线免费观看视频| 亚洲一线二线三线久久久| 国产综合一区二区| 欧美高清视频一二三区| 最近中文字幕一区二区三区| 蜜臀精品久久久久久蜜臀 | 日韩你懂的电影在线观看| 一区二区三区日本| 成人性生交大片免费看中文 | 91蝌蚪porny九色| www成人在线观看| 偷偷要91色婷婷| 97久久精品人人做人人爽50路| 欧美精品一区二区高清在线观看 | 九一久久久久久| 欧美视频自拍偷拍| 亚洲精品国产精华液| 成人在线综合网站| 国产日韩欧美一区二区三区综合| 蜜桃视频在线观看一区二区| 欧美久久久久久久久| 夜夜嗨av一区二区三区| 99国产精品国产精品久久| 亚洲国产精品精华液2区45| 国产在线看一区| 日韩精品一区二区在线| 日韩一区精品视频| 欧美日韩国产不卡| 亚洲无人区一区| 欧美亚洲一区二区在线观看| 夜色激情一区二区| 在线欧美日韩国产| 亚洲精品国产高清久久伦理二区| 91啪在线观看| 亚洲日本成人在线观看| 色猫猫国产区一区二在线视频| 亚洲欧洲美洲综合色网| aa级大片欧美| 一区二区三区精品视频在线| 一本色道a无线码一区v| 亚洲综合在线免费观看| 色94色欧美sute亚洲线路一久| 亚洲天堂成人网| 色噜噜狠狠色综合中国| 一区二区三区四区在线| 欧美日韩一区二区电影| 午夜精品久久久久久久久| 欧美一区二区三区播放老司机| 日韩精品欧美精品| 精品第一国产综合精品aⅴ| 国产一区二区影院| 国产精品久久久久三级| 成人av电影在线| 一区二区三区四区不卡视频| 欧美日韩极品在线观看一区| 美国精品在线观看| 国产欧美一区二区在线观看| 99re成人精品视频| 污片在线观看一区二区| 精品成人一区二区三区四区| 国产精品18久久久久久久久| 国产精品网站在线| 在线观看免费成人| 精品一区二区三区影院在线午夜| 国产欧美一区二区精品忘忧草| 91年精品国产| 日本女人一区二区三区| 久久精品一区二区三区四区| 99视频在线精品| 美脚の诱脚舐め脚责91| 国产精品福利一区二区三区|