Create a new temporary file

@param int $mode permission
@return \holyshared\peridot\temporary\TemporaryFile
502958
public function makeFile($mode = FileSystemPermission::NORMAL)
    {
        $fileId = $this->generateId();
        $filePath = sys_get_temp_dir() . '/' . $fileId;
        $file = new TemporaryFile($filePath, $mode);

        return $file;
    }
520884
public function addFile($name, $mode = 'c+')
    {
        $path = $this->details->getRealPath();
        return new File($path .'/'. ltrim($name, '/'), $mode);
    }
744449
public function createDir($mode = 0777)
    {
        return is_dir($this->absoluteFileName) || mkdir($this->absoluteFileName, $mode, true);
    }
550341
public function change_permission($mode)
    {

        if (empty($mode) || !is_int($mode)) return false;

        if (chmod($this->path . $this->filename, $mode)) {
            return $this->open($this->path . $this->filename);
        }

        return false;
    }
1261924
def tempfile(self, mode='wb', **args):
        ""
        tf = tempfile.NamedTemporaryFile(mode=mode)
        self.write(tf.name, mode=mode, **args)
        return tfn
1369957
public static function createTmpDir() {
        $tmpDir = sys_get_temp_dir();
        $tmpDir .= $tmpDir[strlen($tmpDir) - 1] !== '/' ? '/' : '';
        $tmpDir .= uniqid() . '/';
        if (mkdir($tmpDir)) {
            return $tmpDir;
        } else {
            throw new Exception('Could not create directory ' . $tmpDir);
        }
    }
753998
public static function setCacheMode($mode = 1)
    {
        $instance = self::getInstance();
        if ($mode == 1) {
            $instance->_options['mode'] = 1;
        } else {
            $instance->_options['mode'] = 2;
        }

        return $instance;
    }
1076594
public static function createDir(string $dir, int $mode = 0777): void
	{
		NetteFileSystem::createDir($dir, $mode);
	}
1097272
public static function createTempPathNamed($name)
    {
        $dir = static::createTempPath();

        if (!unlink($dir)) {
            // @codeCoverageIgnoreStart
            throw new FileException(
                'The temporary file could not be deleted.'
            );
        }
        // @codeCoverageIgnoreEnd

        if (!mkdir($dir)) {
            // @codeCoverageIgnoreStart
            throw new FileException(
                'A new temporary directory could not be created.'
            );
        }
        // @codeCoverageIgnoreEnd

        $path = $dir . DIRECTORY_SEPARATOR . $name;

        if (!touch($path)) {
            // @codeCoverageIgnoreStart
            throw new FileException(
                'A new temporary file could not be created.'
            );
        }
        // @codeCoverageIgnoreEnd

        return $path;
    }
1249195
public static function setNewFileMode(string $mode = '740'): void
    {
        static::init();
        static::$newFileMode = \preg_match('/^[0-7]{3}$/', $mode) ? \intval($mode, 8) : 0740;
    }
1096538
public function setMode(string $mode): WebAclRule {
        self::checkMode($mode);
        $this->mode = (int) $mode;
        return $this;
    }
424066
def new_temp_file(directory=None, hint=''):
    ''''''
    return tempfile.NamedTemporaryFile(
        prefix='tmp-wpull-{0}-'.format(hint), suffix='.tmp', dir=directory)
438163
public function copy($dst, $mode=null) {
		$dst = \Asgard\File\FileSystem::copy($this->src, $dst, $mode);
		if($dst) {
			$copy = clone $this;
			$copy->setSrc($dst);
			return $copy;
		}
		return false;
	}
764579
public function create($parameters)
    {
        $this->checkParameters(CloudItemInterface::TYPE_FILE, FileInterface::REQUIRED_PARAMETERS, (array) $parameters);

        $file = new File();
        $file->setName($parameters['name'])
            ->setSize((int) $parameters['size'])
            ->setParentFolder($parameters['parentFolder'])
            ->setId($parameters['id'])
            ->setProvider($parameters['provider'])
        ;

        return $file;
    }
1033991
static public function createTempDir($rootName = 'root')
    {
        self::$root = vfsStream::setup($rootName);

        return vfsStream::url($rootName) . DIRECTORY_SEPARATOR;
    }
950254
public function setCreateMode(int $createMode): self
    {
        $this->createModeOctal       = $createMode;
        $this->createModeOctalString = decoct($createMode);

        return $this;
    }
314304
public function setDefaultMode(string $mode = null) : RauthInterface
    {
        if (!in_array($mode, self::MODES)) {
            throw new \InvalidArgumentException(
                'Mode ' . $mode . ' not accepted!'
            );
        }
        $this->defaultMode = $mode;

        return $this;
    }