Pimcore\File::getDefaultMode PHP Method

getDefaultMode() public static method

public static getDefaultMode ( ) : integer
return integer
    public static function getDefaultMode()
    {
        return self::$defaultMode;
    }

Usage Example

Example #1
0
 /**
  * returns the path to a temp file
  *
  * @return string
  */
 public function getTemporaryFile($fullPath = false)
 {
     $destinationPath = PIMCORE_TEMPORARY_DIRECTORY . "/asset-temporary/asset_" . $this->getId() . "_" . md5(microtime()) . "__" . $this->getFilename();
     if (!is_dir(dirname($destinationPath))) {
         File::mkdir(dirname($destinationPath));
     }
     $src = $this->getStream();
     $dest = fopen($destinationPath, "w+");
     stream_copy_to_stream($src, $dest);
     fclose($dest);
     @chmod($destinationPath, File::getDefaultMode());
     if ($fullPath) {
         return $destinationPath;
     }
     return str_replace(PIMCORE_DOCUMENT_ROOT, "", $destinationPath);
 }
All Usage Examples Of Pimcore\File::getDefaultMode