def add_file(self, path, compress):
if not os.path.isfile(path):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(path))<EOL><DEDENT>self.fileobj.seek(self.last_offset)<EOL>with open(path, '<STR_LIT:rb>') as f:<EOL><INDENT>flags = os.stat(path).st_mode & <NUM_LIT><EOL>self.add_fileobj(f, path, compress, flags)<EOL><DEDENT>
Add a single file to the MAR file.

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