Archive.addFile

Adds a file to the archive. If the path to the file contains directories that are not in the archive, they are added.

class Archive(T, Filter = NullArchiveFilter)
void
addFile

Throws

IllegalPathException when an element in the given path is already used for a file/directory or the path is otherwise invalid.

Examples

// inserts apple.txt into the archive.
archive.addFile(new archive.File("apple.txt")); 

// inserts directory animals (if not exists) and dogs.txt into the archive.
archive.addFile(new archive.File("animals/dogs.txt"));

Meta