Package org.exoplatform.frameworks.ftpclient.commands

Examples of org.exoplatform.frameworks.ftpclient.commands.CmdMkd


      client.connect();

      assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(new CmdUser("admin")));
      assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(new CmdPass("admin")));
      assertEquals(FtpConst.Replyes.REPLY_215, client.executeCommand(new CmdSyst()));
      assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd("/production/test_folder")));

      client.close();

      log.info("Complete.");
   }
View Full Code Here


      client.connect();

      assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(new CmdUser("admin")));
      assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(new CmdPass("admin")));
      assertEquals(FtpConst.Replyes.REPLY_215, client.executeCommand(new CmdSyst()));
      assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd("/production/test_folder")));
      assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(new CmdRmd("/production/test_folder")));

      client.close();

      log.info("Complete.");
View Full Code Here

      client.connect();

      assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(new CmdUser("admin")));
      assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(new CmdPass("admin")));
      assertEquals(FtpConst.Replyes.REPLY_215, client.executeCommand(new CmdSyst()));
      assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd("/production/test_kokanoid_torename")));

      assertEquals(FtpConst.Replyes.REPLY_350, client.executeCommand(new CmdRnFr("/production/test_kokanoid_torename")));
      assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(new CmdRnTo("/production/test_kokanoid_renamed")));
      assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(new CmdRmd("/production/test_kokanoid_renamed")));
View Full Code Here

         {
            CmdCwd cmdCwd = new CmdCwd(FtpTestConfig.TEST_FOLDER);
            if (FtpConst.Replyes.REPLY_550 == client.executeCommand(cmdCwd))
            {
               CmdMkd cmdMkd = new CmdMkd(FtpTestConfig.TEST_FOLDER);
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));

               cmdCwd = new CmdCwd(FtpTestConfig.TEST_FOLDER);
               assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));
            }

            for (int i1 = 0; i1 < 10; i1++)
            {

               String folderName = FtpTestConfig.TEST_FOLDER + "/" + i1;
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd(folderName)));

               for (int i2 = 0; i2 < 10; i2++)
               {
                  String testSubFolder = folderName + "/" + i2;
                  assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd(testSubFolder)));
               }

            }
         }
View Full Code Here

            }

            Thread.sleep(SLEEP);

            {
               CmdMkd cmdMkd = new CmdMkd(folderName);
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd, FtpConst.Replyes.REPLY_257, 3));
            }

            Thread.sleep(SLEEP);

            {
               CmdCwd cmdCwd = new CmdCwd(folderName);
               assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));
            }

            Thread.sleep(SLEEP);

            String folderPath = FtpTestConfig.TEST_FOLDER + "/" + folder1Name + "/" + folder2Name + "/" + folderName;
            log.info("FOLDER PATH: [" + folderPath + "]");

            {
               CmdPwd cmdPwd = new CmdPwd();
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdPwd));
               assertEquals(folderPath, cmdPwd.getCurrentPath());
            }

            Thread.sleep(SLEEP);

            for (int i1 = 0; i1 < itemsCount; i1++)
            {

               String tf1Name = "test_folder_" + i1;

               CmdMkd cmdMkd = new CmdMkd(tf1Name);
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd, FtpConst.Replyes.REPLY_257, 3));

               Thread.sleep(SLEEP);

               assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(new CmdCwd(tf1Name)));
View Full Code Here

            }

            for (int i1 = 1; i1 <= ITEMS_COUNT; i1++)
            {
               String folder1 = rootTestFolder + "/folder_" + i1;
               assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd(folder1)));
               for (int i2 = 1; i2 <= ITEMS_COUNT; i2++)
               {
                  String folder2 = folder1.substring(0);
                  folder2 += "/subfolder_" + i2;
                  assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(new CmdMkd(folder2)));

                  for (int i3 = 0; i3 < ITEMS_COUNT; i3++)
                  {

                     assertEquals(FtpConst.Replyes.REPLY_227, client.executeCommand(new CmdPasv()));
View Full Code Here

      FtpClientSession client = FtpTestConfig.getTestFtpClient();
      client.connect();

      {
         CmdMkd cmdMkd = new CmdMkd("");
         assertEquals(FtpConst.Replyes.REPLY_530, client.executeCommand(cmdMkd));
      }

      {
         CmdUser cmdUser = new CmdUser(FtpTestConfig.USER_ID);
         assertEquals(FtpConst.Replyes.REPLY_331, client.executeCommand(cmdUser));
      }

      {
         CmdPass cmdPass = new CmdPass(FtpTestConfig.USER_PASS);
         assertEquals(FtpConst.Replyes.REPLY_230, client.executeCommand(cmdPass));
      }

      {
         CmdMkd cmdMkd = new CmdMkd("");
         assertEquals(FtpConst.Replyes.REPLY_500, client.executeCommand(cmdMkd));
      }

      {
         CmdMkd cmdMkd = new CmdMkd("myfolder");
         assertEquals(FtpConst.Replyes.REPLY_550, client.executeCommand(cmdMkd));
      }

      {
         CmdCwd cmdCwd = new CmdCwd("production");
         assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));

         String folderName = "test_folder_" + System.currentTimeMillis();

         CmdMkd cmdMkd = new CmdMkd(folderName);
         assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));

         CmdRmd cmdRmd = new CmdRmd(folderName);
         assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdRmd));
      }
View Full Code Here

        CmdCwd cmdCwd = new CmdCwd("production");
        assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));

        String folderName = "test_folder_123" + ":[]*'\"|" + "123";

        CmdMkd cmdMkd = new CmdMkd(folderName);
        assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));
       
        CmdRmd cmdRmd = new CmdRmd("test_folder_123" + "_______" + "123");
        assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdRmd));
      }
View Full Code Here

      }

      String folderName = "/production/folder_to_rename";

      {
         CmdMkd cmdMkd = new CmdMkd(folderName);
         assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));
      }

      {
         CmdRnFr cmdRnFr = new CmdRnFr(folderName);
View Full Code Here

         CmdCwd cmdCwd = new CmdCwd("production");
         assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdCwd));

         String folderName = "test_folder_" + System.currentTimeMillis();

         CmdMkd cmdMkd = new CmdMkd(folderName);
         assertEquals(FtpConst.Replyes.REPLY_257, client.executeCommand(cmdMkd));

         CmdRmd cmdRmd = new CmdRmd(folderName);
         assertEquals(FtpConst.Replyes.REPLY_250, client.executeCommand(cmdRmd));
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.frameworks.ftpclient.commands.CmdMkd

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.