Opens the file handler

@author Art <a.molcanovas@gmail.com>

@param bool $force Whether to force it

@return self
338974
private function fopen($force = false) {
            if ($force || !$this->fp) {
                $this->fclose();
                $this->fp = is_resource($this->config->savePath) ? $this->config->savePath
                    : fopen($this->config->savePath, 'ab');
            }

            return $this;
        }
423286
public function refresh(bool $force = false, bool $cascade = false) : bool
    {
        $this->relinkDB();
        return $this->load();
    }
202131
protected function openFile()
    {
        if (is_null($this->fp)) {
            $this->fp = @fopen($this->file, $this->mode);
            if (! $this->fp) {
                throw new Error('Unable to open ' . $this->file);
            }
        }

        return $this;
    }
251273
public function cacheConfig($force = false)
    {
        if ($this->cacheFile->exists() && $force === false) {
            return;
        }
        $this->cacheFile->dump($this->data);
    }
932553
public function force_open() {
        $this->forceopen = true;
        if ($this->parent !== null) {
            $this->parent->force_open();
        }
    }
996831
public function isOver32(bool $force = false): bool
    {
        // value 0xFFFFFFFF already needs a Zip64 header
        return $force ||
            max(array_slice($this->bytes, 4, 4)) > 0 ||
            min(array_slice($this->bytes, 0, 4)) === 0xFF;
    }
840368
public function toggleClass(string $class, ?bool $force = null): self
    {
        $this->classList->toggle($class, $force);

        return $this;
    }
1115160
public function hasTranslations(bool $force = false)
    {
        $this->getTranslations($force);

        return $this->translations_list->isFilled();

    }
933550
public function compile($force = false)
    {
        $this->commandCaller->compile($this->configFile, $force, $this->target);
    }
1264184
public function setup($force = false) {
		if(!$force && $this->description)
			return;
		
		$this->changeDescription($this->fetchDescription());
	}
471293
public function get_definition($force = false) {
        if ($this->definition === false || $force) {
            $this->load_definition();
        }
        return $this->definition;
    }
183893
public function open($mode = 'r', $force = false)
    {
        if (!$force && is_resource($this->handle)) {
            return true;
        }
        if ($this->exists() === false && $this->create() === false) {
            return false;
        }

        $this->handle = fopen($this->path, $mode);

        return is_resource($this->handle);
    }
1122344
public function open($file)
    {
        $this->file = $file;

        // update compression to mach file
        if ($this->comptype == Tar::COMPRESS_AUTO) {
            $this->setCompression($this->complevel, $this->filetype($file));
        }

        // open file handles
        if ($this->comptype === Archive::COMPRESS_GZIP) {
            $this->fh = @gzopen($this->file, 'rb');
        } elseif ($this->comptype === Archive::COMPRESS_BZIP) {
            $this->fh = @bzopen($this->file, 'r');
        } else {
            $this->fh = @fopen($this->file, 'rb');
        }

        if (!$this->fh) {
            throw new ArchiveIOException('Could not open file for reading: '.$this->file);
        }
        $this->closed = false;
    }
195068
public static function createAuthorRole($force = false)
    {
        if(!$force) {
            if(Permission::exists('global', 'author')) {
                return false;
            }
        }

        return self::createRole(
            'Author', true, [[
            'app' => 'global',
            'key' => 'author'
            ]]
        );
    }
458641
public static function createAdminRole($force = false)
    {
        if(!$force) {
            if(Permission::exists('global', 'admin')) {
                return false;
            }
        }

        return self::createRole(
            'Admin', true, [[
            'app' => 'global',
            'key' => 'admin'
            ]]
        );
    }
225960
public static function load($force = false) 
    {
        // already loaded
        if (!$force && self::$_loaded) {
            return false;
        }
        self::_resolveDefaultPath();

        $files = glob(realpath(self::$_path)."/*.php");
        foreach ($files as $file) {
            Log::log("loading factory from $file ...");
            include_once $file;
        }
        self::$_loaded = true;
        return self::$_loaded;
    }
182183
public function open($file, $config = array())
    {
        $this->separator = $this->detectSeparator($file);
        return $this->handle = fopen($file, 'rb');
    }