import os

from parallels.core.registry import Registry
from parallels.core.utils.locks.file_lock import FileLock


class GlobalFileLock(FileLock):
    def __init__(self, name):
        lock_dir = os.path.join(Registry.get_instance().get_var_dir(), 'locks')
        super(GlobalFileLock, self).__init__(lock_dir, name)
