function fromString($modStr)
    {
        $this->_reset();

        if (strpos($modStr, 'b') !== false) {
            $this->asBinary();
            $modStr = str_replace('b', '', $modStr); // remove binary sign
        }

        // default modes (r+):
        $modXXX = array_search(strtolower($modStr), $this->mode_available);

        // Mode XXX (RWB):
        $modXXX = ($modXXX!==false) ? $modXXX : strtoupper($modStr);
        for($i=0; $i < strlen($modXXX); $i++) {
            $c = $modXXX[$i];
            switch ($c) {
                // BASE:
                case 'R':
                    $this->openForRead();
                    break;
                case 'W':
                    $this->openForWrite();
                    break;
                // POINTER:
                case 'A':
                    $this->withPointerAtEnd();
                    break;
                case 'B':
                    $this->withPointerAtBeginning();
                    break;
                // CREATE:
                case 'C':
                    $this->createFile();
                    break;
                case 'X':
                    $this->createXFile();
                    break;
                // BIN:
                case 'T':
                    $this->doTruncate();
                    break;
                default:
                    throw new \InvalidArgumentException(sprintf(
                        'Invalid Open Mode Format For (%s) Contains Unknown Char (%s).',
                        $modStr, $c
                    ));
            }
        }

        return $this;
    }