Exemple #1
0
        public void TestCopyFileCross()
        {
            // TODO: Add more tests
            var from = new MemoryFileSystem();

            from.WriteAllText("/test.txt", "test");
            var fs         = new PhysicalFileSystem();
            var outputfs   = new SubFileSystem(fs, fs.ConvertPathFromInternal(SystemPath));
            var outputPath = (UPath)"/test.txt";

            try
            {
                outputfs.WriteAllText(outputPath, "toto");
                from.CopyFileCross("/test.txt", outputfs, outputPath, true);
                var content = outputfs.ReadAllText(outputPath);
                Assert.Equal("test", content);
            }
            finally
            {
                outputfs.DeleteFile(outputPath);
            }
        }