public function getCurrentAppDir(Option $option)
    {
        // has targeted.
        if ($dir = $option->get('app-dir')) {
            return $dir[0] === '/' ? $dir : getcwd() . DS . $dir;
        }
        // or current dir.
        else {
            $current = getcwd();
            $default = null;
            foreach ($this->application->config('directory.apps') as $app) {
                if (strpos($current, $app['dir']) === 0) return $app['dir'];
                if (! $default) $default = $app['dir'];
            }
            return $default;
        }
    }