public void CreateDirs()
        {
            MemoryStream fsImage = new MemoryStream();

            SquashFileSystemBuilder builder = new SquashFileSystemBuilder();

            builder.AddFile(@"\adir\anotherdir\file", new MemoryStream(new byte[] { 1, 2, 3, 4 }));
            builder.Build(fsImage);

            SquashFileSystemReader reader = new SquashFileSystemReader(fsImage);

            Assert.True(reader.DirectoryExists(@"adir"));
            Assert.True(reader.DirectoryExists(@"adir\anotherdir"));
            Assert.True(reader.FileExists(@"adir\anotherdir\file"));
        }
        public void SingleFile()
        {
            MemoryStream fsImage = new MemoryStream();

            SquashFileSystemBuilder builder = new SquashFileSystemBuilder();

            builder.AddFile("file", new MemoryStream(new byte[] { 1, 2, 3, 4 }));
            builder.Build(fsImage);

            SquashFileSystemReader reader = new SquashFileSystemReader(fsImage);

            Assert.Equal(1, reader.GetFileSystemEntries("\\").Length);
            Assert.Equal(4, reader.GetFileLength("file"));
            Assert.True(reader.FileExists("file"));
            Assert.False(reader.DirectoryExists("file"));
            Assert.False(reader.FileExists("otherfile"));
        }