function _assertChannelDir()
    {
        if (!file_exists($this->channelsdir)) {
            if (!$this->hasWriteAccess()) {
                return false;
            }

            require_once 'System.php';
            if (!System::mkdir(array('-p', $this->channelsdir))) {
                return $this->raiseError("could not create directory '{$this->channelsdir}'");
            }
        } elseif (!is_dir($this->channelsdir)) {
            return $this->raiseError("could not create directory '{$this->channelsdir}" .
                "', it already exists and is not a directory");
        }

        if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
            if (!$this->hasWriteAccess()) {
                return false;
            }

            require_once 'System.php';
            if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) {
                return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'");
            }
        } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
            return $this->raiseError("could not create directory '{$this->channelsdir}" .
                "/.alias', it already exists and is not a directory");
        }

        return true;
    }
function _assertChannelDir()
    {
        if (!file_exists($this->channelsdir)) {
            if (!$this->hasWriteAccess()) {
                return false;
            }

            require_once 'System.php';
            if (!System::mkdir(array('-p', $this->channelsdir))) {
                return $this->raiseError("could not create directory '{$this->channelsdir}'");
            }
        } elseif (!is_dir($this->channelsdir)) {
            return $this->raiseError("could not create directory '{$this->channelsdir}" .
                "', it already exists and is not a directory");
        }

        if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
            if (!$this->hasWriteAccess()) {
                return false;
            }

            require_once 'System.php';
            if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) {
                return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'");
            }
        } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) {
            return $this->raiseError("could not create directory '{$this->channelsdir}" .
                "/.alias', it already exists and is not a directory");
        }

        return true;
    }
function _assertChannelDir ( ) { if ( ! file_exists ( $ this -> channelsdir ) ) { if ( ! $ this -> hasWriteAccess ( ) ) { return false ; } require_once 'System.php' ; if ( ! System :: mkdir ( array ( '-p' , $ this -> channelsdir ) ) ) { return $ this -> raiseError ( "could not create directory '{$this->channelsdir}'" ) ; } } elseif ( ! is_dir ( $ this -> channelsdir ) ) { return $ this -> raiseError ( "could not create directory '{$this->channelsdir}" . "', it already exists and is not a directory" ) ; } if ( ! file_exists ( $ this -> channelsdir . DIRECTORY_SEPARATOR . '.alias' ) ) { if ( ! $ this -> hasWriteAccess ( ) ) { return false ; } require_once 'System.php' ; if ( ! System :: mkdir ( array ( '-p' , $ this -> channelsdir . DIRECTORY_SEPARATOR . '.alias' ) ) ) { return $ this -> raiseError ( "could not create directory '{$this->channelsdir}/.alias'" ) ; } } elseif ( ! is_dir ( $ this -> channelsdir . DIRECTORY_SEPARATOR . '.alias' ) ) { return $ this -> raiseError ( "could not create directory '{$this->channelsdir}" . "/.alias', it already exists and is not a directory" ) ; } return true ; }
Make sure the directory where we keep registry files for channels exists

@return bool TRUE if directory exists, FALSE if it could not be
created

@access private
Make sure the directory where we keep registry files for channels exists