preserveDirHierarchy and directoryPathInArchive seem very very similar exception one is a bool, and the other is a string.
the bool lets me decide to have the full directory hierarchy preserved in the archive as an on off switch, which is nice.
the string lets me also turn this off and on by passing an empty string or null, but also allows for me to create a path that all files will go into.
It seems that the bool is not required, as (preserveDirHierarchy = true) is equivalent to (directoryPathInArchive = null) and (preserveDirHierarchy = false) is equivalent to (directoryPathInArchive = string.Empty). But if you want
to use the bool you MUST provide the directoryPathInArchive which seems extra odd.
If I am missing something let me know if the bool does something extra or different some how, and if so why can't it be rolled into the null and empty string options of the string to simplify?