code: public static void actionCreate(PageContext pc, Resource directory, String serverPassword, boolean createPath, int mode, Object acl, String storage, int nameConflict)
  	    throws PageException {
  
  	SecurityManager securityManager = pc.getConfig().getSecurityManager();
  	securityManager.checkFileLocation(pc.getConfig(), directory, serverPassword);
  
  	if (directory.exists()) {
  	    if (directory.isDirectory()) {
  		if (nameConflict == NAMECONFLICT_SKIP) return;
  
  		throw new ApplicationException("directory [" + directory.toString() + "] already exist");
  	    }
  	    else if (directory.isFile()) throw new ApplicationException("can't create directory [" + directory.toString() + "], it exist a file with same name");
  	}
  	// if(!directory.mkdirs()) throw new ApplicationException("can't create directory
  	// ["+directory.toString()+"]");
  	try {
  	    directory.createDirectory(createPath);
  	}
  	catch (IOException ioe) {
  	    throw Caster.toPageException(ioe);
  	}
  
  	// set S3 stuff
  	setS3Attrs(pc, directory, acl, storage);
  
  	// Set Mode
  	if (mode != -1) {
  	    try {
  		directory.setMode(mode);
  		// FileUtil.setMode(directory,mode);
  	    }
  	    catch (IOException e) {
  		throw Caster.toPageException(e);
  	    }
  	}
      }
docs: create a directory
  
  @throws PageException