public function put($path, $contents, $lock = false)
    {
        // Check if folder exists
        if (!$this->exists(dirname($path))) {
            mkdir(dirname($path), 0775, true);
        }

        return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    }