PHP Classes

File: src/tmp_dirs.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   CMS Airship   src/tmp_dirs.php   Download  
File: src/tmp_dirs.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: CMS Airship
Content management system with security features
Author: By
Last change: PHPStorm inspection cleanup.
Date: 7 years ago
Size: 501 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

$tmpDirsClosure = function () {
// Sanity check:
   
$tmpDirs = [
       
'comments',
       
'csp_hash',
       
'csp_static',
       
'hash',
       
'markdown',
       
'static',
       
'twig'
   
];
    foreach (
$tmpDirs as $d) {
        if (!\
is_dir(ROOT . '/tmp/cache/' . $d)) {
            \
mkdir(
               
ROOT . '/tmp/cache/' . $d,
               
0775,
               
true
           
);
        }
    }
};
$tmpDirsClosure();
unset(
$tmpDirsClosure);