Consider using Drupal file_system API instead of PHP file calls

Created on 10 August 2023, over 1 year ago

Problem/Motivation

This is a follow-up from @Primsi feedback in https://www.drupal.org/project/bs_base/issues/3351106#comment-15075660 Icons font generator Fixed

+++ b/bs_base.drush.inc
@@ -414,6 +463,62 @@ function _bs_base_copy_file($file, array $options) {
+  if (!is_dir($destination)) {

We could use the FileSystem helper here and below that provides tools to work with the file system. FileSystem::prepareDirectory for example checks this and creates if it doesn't exist.

This should be possible but not that trivial to do. For now just creating a follow-up issue for this so we do not forget about this, and consider this in the future when/if needed.

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇷🇸Serbia pivica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024