method changePermByReal documentation in bbn\Ide\Directories
Changes permissions to a file/dir from the old and new real file/dir's path
function($file, $file_new, $type = 'file')
{
!empty($file_new) &&
file_exists($file_new) &&
($id_opt = $this->realToPerm($file, $type)) &&
!$this->realToPerm($file_new, $type)
){
$is_file = $type === 'file';
$code = $is_file ? bbn\Str::fileExt(X::basename($file_new), 1)[0] : X::basename($file_new).'/';
if ( ($id_parent = $this->createPermByReal(X::dirname($file_new).'/', 'dir'))
){
$this->options->setProp($id_opt, ['code' => $code]);
$this->options->move($id_opt, $id_parent);
return true;
}
}
return false;
}
Changes permissions to a file/dir from the old and new real file/dir's path BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions