Consolidation\Cgr\FileSystemUtils::applyDir PHP Method

applyDir() public static method

Set the current working directory if it was specified.
public static applyDir ( $dir )
    public static function applyDir($dir)
    {
        if (empty($dir)) {
            return $dir;
        }
        $origDir = getcwd();
        static::mkdirParents($dir);
        chdir($dir);
        return $origDir;
    }