File "EmptyDir.php"
Full Path: /home/attunedd/public_html/wp-content/plugins/wpide/App/Helpers/EmptyDir.php
File size: 510 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace WPIDE\App\Helpers;
use WPIDE\App\Services\Storage\LocalFileSystem;
class EmptyDir
{
public static function create($path) {
if ( ! is_dir( $path ) ) {
wp_mkdir_p( $path );
}
$fs = LocalFileSystem::load($path);
if(!$fs->fileExists('/.htaccess')){
$fs->store('/', '.htaccess', 'Deny from all', true);
}
if(!$fs->fileExists('/index.html')){
$fs->store('/', 'index.html', '', true);
}
}
}