code: public static <T extends File> T createFile(final SecurityContext securityContext, final InputStream fileStream, final String contentType, final Class<T> fileType, final String name, final Folder parentFolder)
  		throws FrameworkException, IOException {
  
  		final PropertyMap props = new PropertyMap();
  
  		props.put(StructrApp.key(AbstractFile.class, "name"), name);
  		props.put(StructrApp.key(File.class, "contentType"), contentType);
  
  		if (parentFolder != null) {
  
  			props.put(StructrApp.key(File.class, "hasParent"), true);
  			props.put(StructrApp.key(File.class, "parent"), parentFolder);
  
  		}
  
  		return createFile(securityContext, fileStream, fileType, props);
  	}
docs: Create a new file node from the given input stream and sets the parentFolder
  
  @param <T>
  @param securityContext
  @param fileStream
  @param contentType
  @param fileType defaults to File.class if null
  @param name
  @param parentFolder
  @return file
  @throws FrameworkException
  @throws IOException