public virtual void TestDeleteFile()
        {
            Directory dir = new NRTCachingDirectory(NewDirectory(), 2.0, 25.0);

            dir.CreateOutput("foo.txt", IOContext.DEFAULT).Dispose();
            dir.DeleteFile("foo.txt");
            Assert.AreEqual(0, dir.ListAll().Length);
            dir.Dispose();
        }
        public virtual void TestDirectoryFilter()
        {
            Directory dir  = new NRTCachingDirectory(NewFSDirectory(CreateTempDir("foo")), 2.0, 25.0);
            string    name = "file";

            try
            {
                dir.CreateOutput(name, NewIOContext(Random)).Dispose();
                Assert.IsTrue(SlowFileExists(dir, name));
                Assert.IsTrue(ContainsFile(dir, name));
            }
            finally
            {
                dir.Dispose();
            }
        }
 public virtual void TestDirectoryFilter()
 {
     Directory dir = new NRTCachingDirectory(NewFSDirectory(CreateTempDir("foo")), 2.0, 25.0);
     string name = "file";
     try
     {
         dir.CreateOutput(name, NewIOContext(Random())).Dispose();
         Assert.IsTrue(SlowFileExists(dir, name));
         Assert.IsTrue(Arrays.AsList(dir.ListAll()).Contains(name));
     }
     finally
     {
         dir.Dispose();
     }
 }
 public virtual void TestDeleteFile()
 {
     Directory dir = new NRTCachingDirectory(NewDirectory(), 2.0, 25.0);
     dir.CreateOutput("foo.txt", IOContext.DEFAULT).Dispose();
     dir.DeleteFile("foo.txt");
     Assert.AreEqual(0, dir.ListAll().Length);
     dir.Dispose();
 }