Beispiel #1
0
        public void CopyFileTest()
        {
            var FoundFiles = LocalFileSystem.FindFiles("/Mounted/DirectoryOnMountedFileSystem", "*.dat");

            var SourcePath      = "/Mounted/DirectoryOnMountedFileSystem/1.txt";
            var DestinationPath = "/Mounted/DirectoryOnMountedFileSystem/10.bin";

            try
            {
                LocalFileSystem.DeleteFile(DestinationPath);
            }
            catch
            {
            }

            LocalFileSystem.CopyFile(SourcePath, DestinationPath);

            Assert.AreEqual(
                LocalFileSystem.GetFileInfo(SourcePath).Size,
                LocalFileSystem.GetFileInfo(DestinationPath).Size
                );

            LocalFileSystem.DeleteFile(DestinationPath);
        }