method movePermByReal documentation in bbn\Appui\Ide

Moves permissions to a file/dir from the old and new real file/dir's path

function(string $old, string $new, string $type = 'file') { $type = strtolower($type); if ( !empty($old) && !empty($new) && !empty($this->fs->exists($new)) ) { $id_opt = $this->realToPerm($old, $type); $id_new_opt = $this->realToPerm($new, $type); if (empty($id_new_opt)) { $id_new_opt = $this->createPermByReal(X::dirname($new) . '/', 'dir'); } if (($id_opt !== $id_new_opt) && !empty($id_new_opt)) { $is_file = $type === 'file'; $code = $is_file ? Str::fileExt(X::basename($new), 1)[0] : X::basename($new) . '/'; if ($id_parent = $this->createPermByReal(X::dirname($new) . '/', 'dir')) { $this->options->setCode($id_opt, $code); $this->options->move($id_opt, $id_parent); return true; } } } return false; }

Moves 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.