public static function saveCssFile(\core_kernel_classes_resource $item, $lang, $styleSheetPath, $cssArr)
    {
        $directory = \taoItems_models_classes_ItemsService::singleton()->getItemDirectory($item, $lang);

        $file = $directory->getFile($styleSheetPath);

        // make sure that 'no custom css' means exactly that
        if (empty($cssArr) && $file->exists()) {
            $file->delete();
        }

        $css = self::_buildWarning() . self::arrayToCss($cssArr);
        return $file->put($css);
    }