Exemplo n.º 1
0
        public async Task GetFileTest()
        {
            var provider       = new FileSystemProvider(BaseDir);
            var filename       = Path.GetRandomFileName();
            var outputFileName = Path.GetTempFileName();
            var add            = await provider.AddFile(RandomFileGenerator.RandomFileByteArray(1000), filename);

            await provider.DownloadToFile(filename, outputFileName, true);//overdie if exists since gettempfileme creates the file

            var file = File.ReadAllBytes(outputFileName);

            Assert.IsTrue(await provider.FileExists(filename));
            File.Delete(outputFileName);
        }