Checks if the configuration can be written.

@return bool
@internal
966053
public function canWriteConfiguration()
    {
        $fileLocation = SettingsFiles::getOverrideSettingsFile();

        return @is_writable(file_exists($fileLocation) ? $fileLocation : Environment::getConfigPath() . '/');
    }
819557
protected function isProperlyConfigured()
    {
        if (isset($this->isProperlyConfigured)) {
            return $this->isProperlyConfigured;
        }

        return $this->isProperlyConfigured = $this->checkConfiguration();
    }
765485
public function isAuthorized() {
		if (!Configure::read('Config.productive')) {
			return true;
		}
		$pwd = $this->Controller->request->getQuery('pwd');
		if ($pwd && $pwd === Configure::read('Config.pwd')) {
			return true;
		}
		return false;
	}
84600
public function check()
    {
        $result = true;

        $configurationSettings = [
            'Database.Host',
            'Database.Username',
            'Database.Password',
            'Database.Port',
            'Database.Name',
        ];

        foreach ($configurationSettings as $setting) {
            if ($this->configuration->hasConfigurationKey($setting) === false) {
                $this->missingConfiguration[] = $setting;
                $result = false;
            }
        }

        return $result;
    }
108840
public function isWriteAllowed()
    {
        $msgRepl = ['%s' => $this->relPath];

        // No file, directory not writable
        if (!file_exists($this->absPath) && (!is_writable(dirname($this->absPath)) && !is_writable(dirname(dirname($this->absPath))))) {
            $msg = Trans::__(
                "The translations file '%s' can't be created. You will have to use your own editor to make modifications to this file.",
                $msgRepl
            );
            $this->app['logger.flash']->warning($msg);

        // Have a file, but not writable
        } elseif (file_exists($this->absPath) && !is_writable($this->absPath)) {
            $msg = Trans::__(
                'general.phrase.file-not-writable',
                $msgRepl
            );
            $this->app['logger.flash']->warning($msg);

        // File is not readable: abort
        } elseif (file_exists($this->absPath) && !is_readable($this->absPath)) {
            $msg = Trans::__('general.phrase.error-translation-file-not-readable', $msgRepl);
            $this->app->abort(Response::HTTP_NOT_FOUND, $msg);

        // File is writeable
        } else {
            return true;
        }

        return false;
    }
163381
public static function isEnabled()
    {
        if (is_null(self::$isEnabled)) {
            self::$isEnabled = (bool) Config::getInstance()->Development['enabled'];
        }

        return self::$isEnabled;
    }
1272180
protected function canWrite($path)
    {
        if (is_writable($path)) {
            return true;
        }

        $current = $path;
        while (!file_exists($current) && ($parent = dirname($current)) && $parent !== $current) {
            if (is_writable($parent)) {
                return true;
            }
            $current = $parent;
        }

        return false;
    }
1179733
public function can_export_configuration() : bool {

        if (empty($this->model->timesplitting)) {
            return false;
        }
        if (!$this->get_indicators()) {
            return false;
        }

        if ($this->is_static()) {
            return false;
        }

        return true;
    }
358852
public function isAvailable()
    {
        return \file_exists($this->cacheDir) && \is_dir($this->cacheDir) && \is_writable($this->cacheDir);
    }
1153003
public function isEnabled()
    {
        if ($this->enabled === null) {
            $config = $this->app['config'];
            $configEnabled = value($config->get('debugbar.enabled'));

            if ($configEnabled === null) {
                $configEnabled = $config->get('app.debug');
            }

            $this->enabled = $configEnabled && !$this->app->runningInConsole() && !$this->app->environment('testing');
        }

        return $this->enabled;
    }
615792
protected function ensureDirectoryWritable() {
    // Reality check to prevent stomping on the local filesystem if there is
    // something wrong with the config.
    if (!$this->directory) {
      throw new BltException('Could not save data to a file because the path setting is mis-configured.');
    }

    $writable = is_dir($this->directory) || (!file_exists($this->directory) && @mkdir($this->directory, 0777, TRUE));
    $writable = $writable && is_writable($this->directory);
    if (!$writable) {
      throw new BltException(
        'Could not save data to a file because the path {path} cannot be written to.',
        ['path' => $this->directory]
      );
    }
  }
887668
public function isWritable()
    {
        if ($this->writable === null) {
            $this->writable = false;
            if ($this->isAttached()) {
                foreach (self::$modes['writable'] as $mode) {
                    if (strpos($this->meta['mode'], $mode) === 0) {
                        $this->writable = true;
                        break;
                    }
                }
            }
        }

        return $this->writable;
    }
1219392
static protected function is_log_dir_writable()
  {
    if (!is_writable(self::$log_dir))
      if (self::$to_stderr)
        error_log("Could't open " . self::$log_dir . " for writing. Does " . self::$log_dir . " exist? Permissions?");
  }
1113347
public function isWritable()/*# : bool */
    {
        foreach ($this->lookup_pool as $reg) {
            if ($reg instanceof WritableInterface && $reg->isWritable()) {
                $this->clearLookupCache();
                $this->setWritable($reg);
                return true;
            }
        }
        return false;
    }
472025
public function hasConfigsFactory() {
		if ($this->_configsFactory !== null) {
			return true;
		}
		
		if ($this instanceof LocatorAwareInterface && $this->hasLocator()
			&& $this->getLocator()->has('configsFactory')) {
			return true;
		}
		
		return false;
	}
35237
public function isEditable()
    {
        return $this->read_only || $this->never_persist
            ? false
            : (isset($this->ui['editable']) ? $this->ui['editable'] : !$this->system);
    }
201851
static function is_writable($name)
    {
        if (file_exists(DIR_CONFIG.$name.'.php')){
            return is_writable(DIR_CONFIG.$name.'.php');
        }
        return is_writable(DIR_CONFIG);
    }