MOON
Server: Apache
System: Linux res.emeff.ca 3.10.0-962.3.2.lve1.5.24.10.el7.x86_64 #1 SMP Wed Mar 20 07:36:02 EDT 2019 x86_64
User: accemeff (1004)
PHP: 7.0.33
Disabled: NONE
Upload Files
File: /home/accemeff/vendor/craftcms/cms/src/mutex/FileMutex.php
<?php
/**
 * @link https://craftcms.com/
 * @copyright Copyright (c) Pixel & Tonic, Inc.
 * @license https://craftcms.github.io/license/
 */

namespace craft\mutex;

use Craft;
use craft\helpers\FileHelper;
use yii\base\Exception;

/**
 * @inheritdoc
 * @see Mutex
 * @todo Remove this class when Yii 2.0.11 comes out
 * @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
 * @since 3.0
 */
class FileMutex extends \yii\mutex\FileMutex
{
    /**
     * @inheritdoc
     */
    public function init()
    {
        $mutexPath = Craft::getAlias($this->mutexPath);

        if ($mutexPath === false) {
            throw new Exception('There was a problem getting the mutex path.');
        }
        $this->mutexPath = $mutexPath;
        if (!is_dir($this->mutexPath)) {
            FileHelper::createDirectory($this->mutexPath, $this->dirMode, true);
        }
    }

    /**
     * @inheritdoc
     */
    protected function getLockFilePath($name)
    {
        return $this->mutexPath . DIRECTORY_SEPARATOR . md5($name) . '.lock';
    }
}