Return-Path: X-Original-To: apmail-lucenenet-commits-archive@www.apache.org Delivered-To: apmail-lucenenet-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2CB6110B0B for ; Wed, 31 Dec 2014 21:33:08 +0000 (UTC) Received: (qmail 61126 invoked by uid 500); 31 Dec 2014 21:33:08 -0000 Delivered-To: apmail-lucenenet-commits-archive@lucenenet.apache.org Received: (qmail 61108 invoked by uid 500); 31 Dec 2014 21:33:07 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 61099 invoked by uid 99); 31 Dec 2014 21:33:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2014 21:33:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9B9AAA3B6F3; Wed, 31 Dec 2014 21:33:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: synhershko@apache.org To: commits@lucenenet.apache.org Date: Wed, 31 Dec 2014 21:33:07 -0000 Message-Id: <0a6bae2f0a6e448dbbacb991c22765fc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] lucenenet git commit: Rename Repository: lucenenet Updated Branches: refs/heads/master 355f09dad -> 4128cedfe Rename Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f3a5a564 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f3a5a564 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f3a5a564 Branch: refs/heads/master Commit: f3a5a564f1e69e29b4ee0fe88ede0f4969c9e637 Parents: 355f09d Author: Itamar Syn-Hershko Authored: Wed Dec 31 23:21:49 2014 +0200 Committer: Itamar Syn-Hershko Committed: Wed Dec 31 23:21:49 2014 +0200 ---------------------------------------------------------------------- src/Lucene.Net.Core/Store/FSDirectory.cs | 40 +++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3a5a564/src/Lucene.Net.Core/Store/FSDirectory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs index aaa278f..25c5c1e 100644 --- a/src/Lucene.Net.Core/Store/FSDirectory.cs +++ b/src/Lucene.Net.Core/Store/FSDirectory.cs @@ -114,7 +114,7 @@ namespace Lucene.Net.Store [Obsolete("this constant is no longer used since Lucene 4.5.")] public const int DEFAULT_READ_CHUNK_SIZE = 8192; - protected internal readonly DirectoryInfo Directory_Renamed; // The underlying filesystem directory + protected internal readonly DirectoryInfo directory; // The underlying filesystem directory protected internal readonly ISet StaleFiles = new HashSet(); // Files written, but not yet sync'ed private int ChunkSize = DEFAULT_READ_CHUNK_SIZE; @@ -133,7 +133,7 @@ namespace Lucene.Net.Store return file; } - public FSDirectory(DirectoryInfo dir) + protected FSDirectory(DirectoryInfo dir) : this(dir, null) { } @@ -151,7 +151,7 @@ namespace Lucene.Net.Store { lockFactory = new NativeFSLockFactory(); } - Directory_Renamed = GetCanonicalPath(path); + directory = GetCanonicalPath(path); if (File.Exists(path.FullName)) { @@ -226,10 +226,10 @@ namespace Lucene.Net.Store // if the lock factory has no lockDir set, use the this directory as lockDir if (dir == null) { - lf.LockDir = Directory_Renamed; + lf.LockDir = directory; lf.LockPrefix = null; } - else if (dir.FullName.Equals(Directory_Renamed.FullName)) + else if (dir.FullName.Equals(directory.FullName)) { lf.LockPrefix = null; } @@ -296,7 +296,7 @@ namespace Lucene.Net.Store public override string[] ListAll() { EnsureOpen(); - return ListAll(Directory_Renamed); + return ListAll(directory); } /// @@ -304,7 +304,7 @@ namespace Lucene.Net.Store public override bool FileExists(string name) { EnsureOpen(); - return File.Exists(Path.Combine(Directory_Renamed.FullName, name)); + return File.Exists(Path.Combine(directory.FullName, name)); } /// @@ -312,7 +312,7 @@ namespace Lucene.Net.Store public override long FileLength(string name) { EnsureOpen(); - FileInfo file = new FileInfo(Path.Combine(Directory_Renamed.FullName, name)); + FileInfo file = new FileInfo(Path.Combine(directory.FullName, name)); long len = file.Length; if (len == 0 && !file.Exists) { @@ -329,7 +329,7 @@ namespace Lucene.Net.Store public override void DeleteFile(string name) { EnsureOpen(); - FileInfo file = new FileInfo(Path.Combine(Directory_Renamed.FullName, name)); + FileInfo file = new FileInfo(Path.Combine(directory.FullName, name)); try { file.Delete(); @@ -353,19 +353,19 @@ namespace Lucene.Net.Store protected internal virtual void EnsureCanWrite(string name) { - if (!Directory_Renamed.Exists) + if (!directory.Exists) { try { - Directory_Renamed.Create(); + directory.Create(); } catch { - throw new System.IO.IOException("Cannot create directory: " + Directory_Renamed); + throw new System.IO.IOException("Cannot create directory: " + directory); } } - FileInfo file = new FileInfo(Path.Combine(Directory_Renamed.FullName, name)); + FileInfo file = new FileInfo(Path.Combine(directory.FullName, name)); if (file.Exists) // delete existing, if any { try @@ -390,7 +390,7 @@ namespace Lucene.Net.Store ISet toSync = new HashSet(names); toSync.IntersectWith(StaleFiles); - foreach (string name in toSync) + foreach (var name in toSync) { Fsync(name); } @@ -399,7 +399,7 @@ namespace Lucene.Net.Store // (otherwise it can happen that the directory does not yet exist)! if (toSync.Count > 0) { - IOUtils.Fsync(Directory_Renamed.FullName, true); + IOUtils.Fsync(directory.FullName, true); } StaleFiles.ExceptWith(toSync); @@ -413,7 +413,7 @@ namespace Lucene.Net.Store string dirName; // name to be hashed try { - dirName = Directory_Renamed.FullName; + dirName = directory.FullName; } catch (System.IO.IOException e) { @@ -446,7 +446,7 @@ namespace Lucene.Net.Store get { EnsureOpen(); - return Directory_Renamed; + return directory; } } @@ -454,7 +454,7 @@ namespace Lucene.Net.Store /// For debug output. public override string ToString() { - return this.GetType().Name + "@" + Directory_Renamed + " lockFactory=" + LockFactory; + return this.GetType().Name + "@" + directory + " lockFactory=" + LockFactory; } /// @@ -495,7 +495,7 @@ namespace Lucene.Net.Store { this.Parent = parent; this.Name = name; - File = new FileStream(Path.Combine(parent.Directory_Renamed.FullName, name), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read); + File = new FileStream(Path.Combine(parent.directory.FullName, name), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read); IsOpen = true; } @@ -555,7 +555,7 @@ namespace Lucene.Net.Store /// protected void Fsync(String name, bool isDir = false) { - IOUtils.Fsync(Path.Combine(Directory_Renamed.FullName, name), false); + IOUtils.Fsync(Path.Combine(directory.FullName, name), false); } } } \ No newline at end of file