class GeminiServer::FileHandler

Defined in:

gemini_server/file_handler.cr

Constant Summary

DIR_ICON = "📁"
FILE_ICON = "📄"

Instance Method Summary

Instance methods inherited from class GeminiServer::UriHandler

can_handle?(uri : URI) : Bool can_handle?, document_root : String document_root, enable_dir_listing : Bool enable_dir_listing, handle(document_root : Path, uri : URI, config : GeminiServer::Config) : GeminiServer::Reply::Base handle, matches_hostname?(uri : URI) : Bool matches_hostname?, vhosts : Array(String) vhosts

Constructor methods inherited from class GeminiServer::UriHandler

new(vhost_config : GeminiServer::VirtualHostConfig) new

Instance Method Detail

def can_handle?(uri : URI) : Bool #

[View source]
def file_listing_line(icon : String, rel_path, filename : String) : String #

[View source]
def gen_directory_index(path_to_dir : Path, rel_path : Path) : IO #

[View source]
def handle(document_root : Path, uri : URI, config : GeminiServer::Config) : GeminiServer::Reply::Base #

[View source]