public function saveFileFromZip($path, $file, $stream) {
    $filePath = $path . '/' . $file;

    // Make sure the directory exists first
    $matches = array();
    preg_match('/(.+)\/[^\/]*$/', $filePath, $matches);
    self::dirReady($matches[1]);

    // Store in local storage folder
    return file_put_contents($filePath, $stream);
  }