Examples of MakeFileCommand


Examples of com.kissme.lang.file.MakeFileCommand

   */
  public static void write(File file, byte[] content) {

    try {

      new MakeFileCommand(file).execute();
      if (file.isDirectory()) {
        throw new IllegalStateException("file[" + file.getName() + "] is a directory!");
      }

      new WriteBytesToFileCommand(file, content).execute();
View Full Code Here

Examples of com.kissme.lang.file.MakeFileCommand

   *
   * @param file
   * @param datas
   */
  public static void appendTo(File file, byte[] datas) {
    new FileCommandInvoker().command(new MakeFileCommand(file))
                .command(new AppendToFileCommand(file, datas))
                .invoke();
  }
View Full Code Here

Examples of com.kissme.lang.file.MakeFileCommand

   * @param source
   * @param target
   */
  public static void move(File source, File target) {

    new FileCommandInvoker().command(new MakeFileCommand(target))
                .command(new CopyFileCommand(source, target))
                .command(new DeleteFileCommand(source))
                .invoke();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.