Default static file.
436776
private function static_file_default(
		string $path, int $cache=0, string $disposition=null
	) {
		if (file_exists($path))
			static::send_file($path, $disposition, 200, $cache);
		$this->abort(404);
	}
485395
def defaultFile(self):
        """"""
        filename = self.curframe.f_code.co_filename
        if filename == '<string>' and self.mainpyfile:
            filename = self.mainpyfile
        return filename
813049
def serve_static(filename=None, prefix='', basedir=None):
    
    if not basedir:
        basedir = os.path.join(os.path.dirname(__file__), 'third_party')
    return send_from_directory(os.path.join(basedir, prefix), filename)
660566
public static function getDefault()
    {
        /** @var $factory Factory */
        $factory    = new static();
        $factory->addFactory(new CommitFactory(), 100)
                ->addFactory(new HeadFileFactory(), 80)
                ->addFactory(new DefaultFactory(), -100);
        return $factory;
    }
1219657
def gen_static(self, output_folder):
        
        files = []
        for l in self.file_listers:
            files += l()
        for f in files:
            _logger.info("generating %s" % f)
            content = self.get(f)
            loc = os.path.join(output_folder, f)
            d = os.path.dirname(loc)
            if not os.path.exists(d):
                os.makedirs(d)
            with open(loc, "wb") as file_:
                file_.write(content)
323673
def static_data(fn):
    
    file_path = os.path.normpath(fn)
    full_path = os.path.join(STATIC_PATH, file_path)

    if not os.path.exists(full_path):
        abort(404, "Soubor '%s' neexistuje!" % fn)

    return static_file(
        file_path,
        STATIC_PATH
    )
315094
def generate_static(self, path):
        
        if not path:
            return ""

        if path[0] == '/':
            return "%s?v=%s" % (path, self.version)

        return "%s/%s?v=%s" % (self.static, path, self.version)
196305
private function preloadDefaults()
    {
        $this->options = array();
        $defaults = static::getDefaults() ?: array();
        foreach ($defaults as $k => $v) {
            $this->options[$k] = $v;
        }
    }
174223
protected function initDefaults()
    {
        if (!$this->hasDefaults) {
            return '';
        }

        $this->defaultsLocation = get_calling_class_directory($this) . DIRECTORY_SEPARATOR . $this->defaultsLocation;

        return ConfigFactory::loadConfigFile($this->defaultsLocation);
    }
1194668
def copy_default_data_file(filename, module=None):
    """"""
    if module is None:
        module = __get_filetypes_module()
    fullpath = get_default_data_path(filename, module=module)
    shutil.copy(fullpath, ".")
751895
def setup(self):
        """"""
        super(CleanCSSFilter, self).setup()
        self.root = current_app.config.get('COLLECT_STATIC_ROOT')
1319982
def glr_path_static():
    """"""
    return os.path.abspath(os.path.join(os.path.dirname(__file__), '_static'))
1031769
public static function createDefault()
    {
        $agent = new static();

        $options = ['Guzzle/' . ClientInterface::VERSION];
        if (extension_loaded('curl')) {
            $options[] = 'curl/' . curl_version()['version'];
        }

        return $agent
            ->setField('Library', static::NAME, static::VERSION, $options)
            ->setField('OS', php_uname('s'), php_uname('r'))
            ->setField('Language', 'PHP', phpversion());
    }
333895
static File preferencesFile() {
        final File userDir = new File(System.getProperty("user.home"));
        final File prefDir = (userDir.canWrite())
            ? new File(userDir, ".acolyte") : null;

        if (prefDir != null && !prefDir.exists()) {
            prefDir.mkdir();
        } // end of if

        return (prefDir != null && prefDir.canRead() && prefDir.canWrite())
            ? new File(prefDir, "studio.properties") : null;

    }
322264
public static URI getDefaultUri(Configuration conf) {
    return URI.create(fixName(conf.get(FS_DEFAULT_NAME_KEY, "file:///")));
  }
1043899
def static!
      return if (public_dir = settings.public_folder).nil?
      public_dir = File.expand_path(public_dir)

      path = File.expand_path(public_dir + unescape(request.path_info))
      return unless path.start_with?(public_dir) and File.file?(path)

      env['sinatra.static_file'] = path
      cache_control(*settings.static_cache_control) if settings.static_cache_control?
      send_file path, :disposition => nil
    end
264598
private function loadStaticFiles(){

		$staticDir = $this->registry->get("_staticDir");

		$staticDir = str_replace("\\", "/", $staticDir);

		if(!empty($staticDir)){

			$dItr = new \RecursiveDirectoryIterator($staticDir);
			$rItrItr  = new \RecursiveIteratorIterator($dItr, \RecursiveIteratorIterator::SELF_FIRST);

			foreach ($rItrItr as $file) {

			    $path = $file->getRealPath();

			    if ($file->isFile()){

			    	$path = str_replace("\\", "/", $path);
			    	$shortUrl = str_replace($staticDir, "", $path);

			    	$mimeTypes = $this->registry->get("mimeTypes");

			    	$ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));

		        	if(in_array($ext, array_keys($mimeTypes))){

		        		$res = $this->registry->get("Response.Ok")->exec();
		        		$res->headers->set('Content-Type', $mimeTypes[$ext]);
						$res->setContent(Fs::cat($path));
		        	}
		        	else{

		        		$res = $this->registry->get("Response.Forbidden")->exec();
		        	}

			        $this->get($shortUrl, function() use($res, $mimeTypes){

			        	return $res;
			        });
			    }
			}
		}
	}