code: private void createNewLocalFile(File newFile) throws CmsException {
  
          if (newFile.exists()) {
              throw new CmsSynchronizeException(
                  Messages.get().container(Messages.ERR_EXISTENT_FILE_1, newFile.getPath()));
          }
          FileOutputStream fOut = null;
          try {
              File parentFolder = new File(
                  newFile.getPath().replace('/', File.separatorChar).substring(
                      0,
                      newFile.getPath().lastIndexOf(File.separator)));
              parentFolder.mkdirs();
              if (parentFolder.exists()) {
                  fOut = new FileOutputStream(newFile);
              } else {
                  throw new CmsSynchronizeException(
                      Messages.get().container(Messages.ERR_CREATE_DIR_1, newFile.getPath()));
              }
          } catch (IOException e) {
              throw new CmsSynchronizeException(
                  Messages.get().container(Messages.ERR_CREATE_FILE_1, this.getClass().getName(), newFile.getPath()),
                  e);
          } finally {
              if (fOut != null) {
                  try {
                      fOut.close();
                  } catch (IOException e) {
                      // ignore
                  }
              }
          }
      }
docs: Creates a new file on the server FS.<p>
  
  @param newFile the file that has to be created
  @throws CmsException if something goes wrong