':type config: object
:param config: An object, most likely populated from
`galaxy/config.ini`, having the same attributes needed by
:class:`ObjectStore` plus:
* file_path -- Default directory to store objects to disk in.
* umask -- the permission bits for newly created files.
:type config_xml: ElementTree
:type file_path: str
:param file_path: Override for the `config.file_path` value.
:type extra_dirs: dict
:param extra_dirs: Keys are string, values are directory paths.'

def __init__(self, config, config_xml=None, file_path=None, extra_dirs=None):

    super(DiskObjectStore, self).__init__(config)
    self.file_path = (file_path or config.file_path)
    if (config_xml is not None):
        for e in config_xml:
            if (e.tag == 'files_dir'):
                self.file_path = e.get('path')
            else:
                self.extra_dirs[e.get('type')] = e.get('path')
    if (extra_dirs is not None):
        self.extra_dirs.update(extra_dirs)
