<?php umask(?int $mask = null): int
<?php if (! is_null($mode)) { chmod($tempPath, $mode); } else { chmod($tempPath, 0777 - umask()); } file_put_contents($tempPath, $content);
<?php $umask = 0131; $originalUmask = umask($umask); $filesystem = new Filesystem;
<?php $this->assertStringEqualsFile($tempFile, 'Yet Something Else Again'); $this->assertEquals($umask, 0777 - $this->getFilePermissions($tempFile)); umask($originalUmask); chmod($symlinkDir, 0777 - $originalUmask);