Пример #1
0
 protected override bool IsArchiveFile(IFileSystem fileSystem, FileSystemPath path)
 {
     return path.IsFile
         && ArchiveExtensions.Contains(path.GetExtension())
         && !HasArchive(path)// HACK: Disable ability to open archives inside archives (SevenZip's stream does not have the ability to trace at the moment).
         ;
 }
 protected override bool IsArchiveFile(IFileSystem fileSystem, FileSystemPath path)
 {
     return(path.IsFile &&
            ArchiveExtensions.Contains(path.GetExtension()) &&
            !HasArchive(path)// HACK: Disable ability to open archives inside archives (SevenZip's stream does not have the ability to trace at the moment).
            );
 }
Пример #3
0
 public void GetExtensionTest()
 {
     Assert.AreEqual(fileA.GetExtension(), "");
     Assert.AreEqual(fileB.GetExtension(), ".txt");
     fileC = FileSystemPath.Parse("/directory.txt/filec");
     Assert.AreEqual(fileC.GetExtension(), "");
     EAssert.Throws <ArgumentException>(() => directoryA.GetExtension());
 }
Пример #4
0
 public void GetExtensionTest()
 {
     Assert.Equal("", _fileA.GetExtension());
     Assert.Equal(".txt", _fileB.GetExtension());
     _fileC = FileSystemPath.Parse("/directory.txt/filec");
     Assert.Equal("", _fileC.GetExtension());
     // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
     EAssert.Throws <ArgumentException>(() => DirectoryA.GetExtension());
 }
Пример #5
0
 public void GetExtensionTest()
 {
     Assert.AreEqual(fileA.GetExtension(), "");
     Assert.AreEqual(fileB.GetExtension(), ".txt");
     fileC = FileSystemPath.Parse("/directory.txt/filec");
     Assert.AreEqual(fileC.GetExtension(), "");
     EAssert.Throws<ArgumentException>(() => directoryA.GetExtension());
 }