Module ArchiveBuilder

module ArchiveBuilder: sig .. end
Utility functions to easily build Java archives.

type error = 
| Duplicate_entry of string
| Duplicate_service of string
exception Exception of error
val string_of_error : error -> string
type t 
The type of archive builders.
val make : ?merge_services:bool ->
?fail_on_duplicate:bool -> ?generate_index:bool -> string -> t
val add_entry : t -> ?prefix:string -> string -> string -> unit
add_entry ab ~prefix data name adds an entry with path name prefixed by prefix (defaulting to "") and contents data to archive builder ab.

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_entry_from_file : t -> ?prefix:string -> string -> string -> unit
add_entry_from_file ab ~prefix file name adds an entry with path name prefixed by prefix (defaulting to "") and contents read from file to archive builder ab.

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_entry_from_class : t -> ?prefix:string -> ClassDefinition.t -> unit
add_entry_from_class ab ~prefix cd adds an entry with path and contents based on the information from class definition cd, prefixing class name by by prefix (defaulting to ""), to archive builder ab.

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_entries_from_zip : t -> ?prefix:string -> Zip.in_file -> unit
add_entries_from_zip ab ~prefix zip adds to archive builder ab all the entries from the archive zip, prefixing paths with prefix (defaulting to "").

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_entries_from_archive : t -> ?prefix:string -> string -> unit
add_entries_from_archive ab ~prefix file adds to archive builder ab all the entries from the archive file, prefixing paths with prefix (defaulting to "").

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_entries_from_archives : t -> ?prefix:string -> string list -> unit
add_entries_from_archives ab ~prefix files adds to archive builder ab all the entries from thes archives files, prefixing paths with prefix (defaulting to "").

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val add_manifest : t -> Manifest.t -> unit
add_manifest ab m adds an entry based on the passed manifest m to archive builder ab.

Raises Error if ab already contains an entry with the same path and ab was passed true for fail_on_duplicate at creation.

val close : t -> unit
Closes the passed archive builder.

Raises Error if index generation was requested, and results in a duplicate entry.

val close_noerr : t -> unit
Same as close, except that no exception if raised.