Create base directory for files.

@param $fileName
178413
protected function makeDir($fileName)
    {
        $dir = dirname($fileName);

        if (! file_exists($dir)) {
            mkdir($dir, 0775, true);
        }
    }
287704
public function addFile($fileName)
    {
        $this->files[$fileName] = sha1_file($fileName);

        $reflection = new FileReflector($fileName, true);
        $reflection->process();

        foreach ($reflection->getClasses() as $class) {
            $class = new ClassDoc($class, $this, ['sourceFile' => $fileName]);
            $this->classes[$class->name] = $class;
        }
        foreach ($reflection->getInterfaces() as $interface) {
            $interface = new InterfaceDoc($interface, $this, ['sourceFile' => $fileName]);
            $this->interfaces[$interface->name] = $interface;
        }
        foreach ($reflection->getTraits() as $trait) {
            $trait = new TraitDoc($trait, $this, ['sourceFile' => $fileName]);
            $this->traits[$trait->name] = $trait;
        }
    }
770521
protected function setFilename($filename) {
        if (false === realpath($filename)) {
            throw new FileNotFoundException(sprintf("The file \"%s\" was not found", $filename));
        }
        $this->filename = realpath($filename);
        return $this;
    }
17262
public function buildBundleBaseDirectoryFromClassname($classname)
    {
        if (false === array_key_exists($classname, $this->reflectionClasses)) {
            $this->reflectionClasses[$classname] = new \ReflectionClass($classname);
        }

        $baseDir = dirname($this->reflectionClasses[$classname]->getFileName());

        if (!is_dir($baseDir)) {
            throw new \RuntimeException("Invalid bundle `$bundle` base directory, expected `$baseDir` to exist.");
        }

        return $baseDir;
    }
1296090
private function loadConfig($fileName) {
		$config = include($this->path . DIRECTORY_SEPARATOR . $fileName . '.php');
		
		$this->map[$fileName] = $config;
	}
967222
private function _addFile($filename)
		{
			if (true === $this->_enabled) {
				if (File::exists($filename)) {
					if (is_dir($filename)) {
						return $this->_zip->addEmptyDir($filename);
					} else {
						return $this->_zip->addFile($filename);
					}
				}
			}

			return false;
		}
656598
protected function saveFile($filename, $content)
    {
        if (!file_exists(dirname($filename))
            && mkdir(dirname($filename), 0777, true) === false
        ) {
            throw new GeneratorException(
                sprintf(
                    "Could not create directory '%s'.",
                    dirname($filename)
                )
            );
        }

        if (file_put_contents($filename, $content) === false) {
            throw new GeneratorException(
                sprintf(
                    "Could not open '%s' for writing.",
                    $filename
                )
            );
        }

        return $this;
    }
383265
public function createFromFile($filename)
    {
        $img = imagecreatefromstring(file_get_contents($filename));
        list($width, $height) = getimagesize($filename);

        $ascii = null;
        $incY = $this->scale;
        $incX = $this->scale / 2;
        
        for ($y = 0; $y < $height - 1; $y += $incY) {
            for ($x = 0; $x < $width - 1; $x += $incX) {
                $toX = min($x + $this->scale / 2, $width - 1);
                $toY = min($y + $this->scale, $height - 1);
                $luminance = $this->luminanceAreaAverage($img, $x, $y, $toX, $toY);
                $ascii .= $this->luminance2character($luminance);
            }
            $ascii .= PHP_EOL;
        }

        return $ascii;
    }
251340
public function setFileName( $fileName ){
		$this->fileName	= $fileName;
		$this->sheet	= self::load( $fileName );
	}
1372470
static public function createFromFile($filename) {
		if (!file_exists($filename))
			throw new Exception('Invalid (filename) parameter! File does not exist!');

		$image_info = getimagesize($filename);
		if ($image_info === false)
			throw new Exception('Invalid (filename) parameter! File is corrupted!');

		switch ($image_info[2]) {
			case IMAGETYPE_JPEG:
			case IMAGETYPE_JPEG2000:
				$image = imagecreatefromjpeg($filename);
				break;
			case IMAGETYPE_PNG:
				$image = imagecreatefrompng($filename);
				break;
			case IMAGETYPE_GIF:
				$image = imagecreatefromgif($filename);
				break;
			case IMAGETYPE_WBMP:
				$image = imagecreatefromwbmp($filename);
				break;
			case IMAGETYPE_BMP:
				$image = imagecreatefrombmp($filename);
				break;
			default:
				throw new Exception('Unknown image format!');
				break;
		}

		return new self($image);
	}
1002373
protected function createConfigFolder($folderName)
    {
        $folder = $this->getBaseConfigFolder().$folderName;
        if (!is_dir($folder)) {
            $this->logger->info("Creating folder config/{$folderName}");
            mkdir($folder);
        }

        return $folder;
    }
1126719
public function createFile($fileName, $preserve = false)
        {
            $this->initRunFolder();

            $fileInfo = new \SplFileInfo($this->tmpRunFolder . DIRECTORY_SEPARATOR . $fileName);

            $this->filesystem->touch($fileInfo);

            $this->files[] = array(
                'file'  => $fileInfo,
                'preserve'  => $preserve
            );

            $this->filesystem->chmod($fileInfo, 0600);

            return $fileInfo;
        }
656101
public function setFilename($filename)
    {
        if (is_array($filename) && isset($filename['name'])) {
            $this->filename = $filename['name'];
        } else {
            $this->filename = $filename;
        }
    }
159613
public function createFolder($folderName) {
		
		// prefix folder path, when realpath fails (e.g. does not exist)

		if(!($path = realpath($folderName))) {

			$path = $this->path . $folderName;

		}
		
		// throw exception when $folderName cannot be established as subdirectory of current folder
		
		else if (strpos($path, $this->path) !== 0) {
			
			throw new FilesystemFolderException(sprintf("Folder %s cannot be created within folder %s.", $folderName, $this->path));
			
		}
		
		// recursively create folder(s) when when path not already exists
		
		if(!is_dir($path)) {

			if(!@mkdir($path, 0777, TRUE)) {
				throw new FilesystemFolderException(sprintf("Folder %s could not be created!", $path));
			}
			else {
				chmod($path, 0777);
			}

			$path = realpath($path);
		}

		return self::getInstance($path);

	}
1295562
protected function createParentDirectory($directory)
    {
        if (! $this->files->isDirectory($directory)) {
            $this->files->makeDirectory($directory, 0755, true);
        }
    }
1373709
def create_file_name(file, base_dir)
      file_name = file.split("/").delete_if { |f| f.include?(".") }.first
      unless File.exists?(File.join(base_dir, file_name))
        Dir.mkdir(File.join(base_dir, file_name))
      end
      file_name
    end
913455
public function create($fileName, $data)
    {
        $path = $this->getPathBase($fileName);

        if (file_exists($path)) {
            return;
        }

        $data = serialize($data);

        return file_put_contents($path, $data);
    }