예제 #1
0
        public void Setup()
        {
            _folder.Create();

            _folder.CombineFile("Test_0_1.txt").Write("0_1");
            _folder.CombineFile("Test_0_2.txt").Write("0_2");

            var subfolder1 = _folder.CombineFolder("SubFolder_1");

            subfolder1.Create();
            subfolder1.CombineFile("Test_1_1.txt").Write("1_1");
            subfolder1.CombineFile("Test_1_2.txt").Write("1_2");

            var subfolder11 = subfolder1.CombineFolder("SubFolder_1_1");

            subfolder11.Create();
            subfolder11.CombineFile("Test_1_1_1.txt").Write("1_1_1");
            subfolder11.CombineFile("Test_1_1_2.txt").Write("1_1_2");

            var subfolder111 = subfolder11.CombineFolder("SubFolder_1_1_1");

            subfolder111.Create();
            subfolder111.CombineFile("Test_1_1_1_1.txt").Write("1_1_1_1");
            subfolder111.CombineFile("Test_1_1_1_2.txt").Write("1_1_1_2");

            var subfolder12 = subfolder1.CombineFolder("SubFolder_1_2");

            subfolder12.Create();
            subfolder12.CombineFile("Test_1_2_1.txt").Write("1_2_1");
            subfolder12.CombineFile("Test_1_2_2.txt").Write("1_2_2");

            var subfolder2 = _folder.CombineFolder("SubFolder_2");

            subfolder2.Create();
            subfolder2.CombineFile("Test_2_1.txt").Write("2_1");
            subfolder2.CombineFile("Test_2_2.txt").Write("2_2");

            var subfolder21 = subfolder2.CombineFolder("SubFolder_2_1");

            subfolder21.Create();
            subfolder21.CombineFile("Test_2_1_1.txt").Write("2_1_1");
            subfolder21.CombineFile("Test_2_1_2.txt").Write("2_1_2");

            var subfolder22 = subfolder2.CombineFolder("SubFolder_2_2");

            subfolder22.Create();
            subfolder22.CombineFile("Test_2_2_1.txt").Write("2_2_1");
            subfolder22.CombineFile("Test_2_2_2.txt").Write("2_2_2");
        }
예제 #2
0
        public override void Copy(FsFolder destination)
        {
            destination.Create();

            foreach (var subFolder in SearchFolders())
            {
                var subpath = subFolder.Path.Substring(Path.Length);
                destination.CombineFolder(subpath).Create();
            }

            foreach (var file in SearchFiles())
            {
                var subFile = file.Path.Substring(Path.Length);
                file.Copy(destination.CombineFile(subFile));
            }
        }
예제 #3
0
 public void Setup() => _folder.Create();
예제 #4
0
 public void Setup()
 {
     _folder.Create();
 }