class StaticAssets::DiskStore

Overview

Filesystem-backed asset store with symlink-escape protection and .br/.gz sidecars.

Included Modules

Defined in:

static_assets/store.cr

Constructors

Instance Method Summary

Instance methods inherited from module StaticAssets::Store

directory?(relative_path : String) : Bool directory?, resolve(relative_path : String, accept_encoding : String | Nil, precompressed : Bool = true) : ResolvedAsset | Nil resolve

Constructor Detail

def self.new(root : String = "public") #

[View source]

Instance Method Detail

def directory?(relative_path : String) : Bool #
Description copied from module StaticAssets::Store

Returns true if relative_path resolves to a directory (for index_file fallback).


[View source]
def resolve(relative_path : String, accept_encoding : String | Nil, precompressed : Bool = true) : ResolvedAsset | Nil #
Description copied from module StaticAssets::Store

Resolves relative_path (slash-delimited, without leading /) and selects the preferred representation according to accept_encoding.


[View source]
def root : String #

[View source]