Exemplo n.º 1
0
        public void OpenFileFail()
        {
            var mountfs = new MountFileSystem();

            Assert.Throws <FileNotFoundException>(() => mountfs.OpenFile("/toto.txt", FileMode.Open, FileAccess.Read));
            Assert.Throws <UnauthorizedAccessException>(() => mountfs.OpenFile("/toto.txt", FileMode.Create, FileAccess.Read));
        }
Exemplo n.º 2
0
 public Stream OpenFile(string path)
 {
     return(_fileSystem.OpenFile(path, FileMode.Open, FileAccess.Read, FileShare.Read));
 }