def lock(backend=None, remote=None):
    fileserver = salt.fileserver.Fileserver(__opts__)
    locked, errors = fileserver.lock(back=backend, remote=remote)
    ret = {}
    if locked:
        ret['locked'] = locked
    if errors:
        ret['errors'] = errors
    if not ret:
        return 'No locks were set'
    return ret
.. versionadded:: 2015.5.0
dataset/ETHPy150Open saltstack/salt/salt/runners/fileserver.py/lock