public function createFile($name = null)
    {
        if (null === $name) {
            if (false === ($file = tempnam(sys_get_temp_dir(), 'tst'))) {
                throw FileSystemException::lastError($name);
            }

            $this->purgePaths[] = $file;
        } else {
            if (false === touch(
                $file = $this->createDir() . DIRECTORY_SEPARATOR . $name
            )){
                throw FileSystemException::lastError($file);
            }
        }

        return $file;
    }