def add_dir(self, path, compress):
if not os.path.isdir(path):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(path))<EOL><DEDENT>for root, dirs, files in os.walk(path):<EOL><INDENT>for f in files:<EOL><INDENT>self.add_file(os.path.join(root, f), compress)<EOL><DEDENT><DEDENT>
Add all files under directory `path` to the MAR file.

        Args:
            path (str): path to directory to add to this MAR file
            compress (str): One of 'xz', 'bz2', or None. Defaults to None.