22 namespace Lucene.Net.Store
42 public abstract class Directory : System.IDisposable
44 protected internal volatile bool isOpen =
true;
54 public abstract System.String[] ListAll();
57 public abstract bool FileExists(System.String name);
60 public abstract long FileModified(System.String name);
63 public abstract void TouchFile(System.String name);
66 public abstract void DeleteFile(System.String name);
69 public abstract long FileLength(System.String name);
75 public abstract IndexOutput CreateOutput(System.String name);
82 public virtual void Sync(System.String name)
87 public abstract IndexInput OpenInput(System.String name);
96 public virtual IndexInput OpenInput(System.String name,
int bufferSize)
98 return OpenInput(name);
104 public virtual Lock MakeLock(System.String name)
106 return interalLockFactory.MakeLock(name);
114 public virtual void ClearLock(System.String name)
116 if (interalLockFactory != null)
118 interalLockFactory.ClearLock(name);
122 [Obsolete(
"Use Dispose() instead")]
129 public void Dispose()
134 protected abstract void Dispose(
bool disposing);
147 System.Diagnostics.Debug.Assert(lockFactory != null);
148 this.interalLockFactory = lockFactory;
159 get {
return this.interalLockFactory; }
169 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Design",
"CA1024:UsePropertiesWhereAppropriate")]
170 public virtual string GetLockId()
175 public override string ToString()
177 return base.ToString() +
" lockFactory=" +
LockFactory;
203 System.String[] files = src.
ListAll();
208 for (
int i = 0; i < files.Length; i++)
211 if (!filter.Accept(null, files[i]))
223 long len = is_Renamed.
Length();
225 while (readCount < len)
243 if (is_Renamed != null)
253 public void EnsureOpen()
259 public bool isOpen_ForNUnit
261 get {
return isOpen; }