Package org.jboss.fresh.vfs

Examples of org.jboss.fresh.vfs.VFS.createFile()


      if (vfs.exists(shell.getUserCtx(), path.getPath(), true)) {

        if (!vfs.exists(shell.getUserCtx(), path, true)) {
          FileInfo dir = new FileInfo(path, FileInfo.TYPE_DIR);
          vfs.createFile(shell.getUserCtx(), dir);
          //out.println(param+ ": Directory successfully created.");

        } else {
          if (canThrowEx()) {
            throw new RuntimeException(param + ": Path already exists!");
View Full Code Here


      linkXsts = vfs.exists(shell.getUserCtx(), link, true);

      if (targetXsts && !linkXsts) {
        FileInfo linkInfo = new FileInfo(link, FileInfo.TYPE_LINK);
        linkInfo.setTarget(target);
        vfs.createFile(shell.getUserCtx(), linkInfo);

      } else {
        if (!targetXsts) {
          if (canThrowEx()) {
            throw new Exception(target + ": Target must exist! Cannot create a dead link!");
View Full Code Here

          vfs.updateFile(shell.getUserCtx(), info);
          out.println(path + ": Modified date set to now.");
        } else if (create) {
          FileInfo info = new FileInfo(path, FileInfo.TYPE_FILE);
          info.setMime("undefined");
          vfs.createFile(shell.getUserCtx(), info);
          out.println(path + ": File created.");
        } else {
          out.println(path + ": File does not exist.");
        }
      }
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.