initUmask() public static method

Init the umask to use creating files/directories, either with the passed value or the one found in the configuration.
public static initUmask ( integer $umask ) : void
$umask integer The new umask to set
return void
コード例 #1
0
 /**
  * Init the umask to use creating files/directories, either with
  * the passed value or the one found in the configuration.
  *
  * @param integer $umask The new umask to set
  *
  * @return void
  * @throws \Exception Is thrown if the umask can not be set
  */
 public function initUmask($umask = null)
 {
     // check if a umask has been passed
     if ($umask == null) {
         $umask = $this->getInitialContext()->getSystemConfiguration()->getParam('umask');
     }
     // initialize the umask
     FileSystem::initUmask($umask);
 }