Class

CogDirectoryFilesHandler

Description [src]

final class Cog.DirectoryFilesHandler : GObject.TypeInstance {
  /* No available fields */
}

Request handler implementation that loads content from files inside a local directory.

By default only the path component of requested URIs is taken into account, and setting CogDirectoryFilesHandler:use-host. also uses the URI host component. If a resolved path points to a local directory and it contains a file named index.html, it will be used as the response.

Implements

Instance methods

cog_directory_files_handler_get_strip_components

Gets the value of the CogDirectoryFilesHandler:strip-components property.

cog_directory_files_handler_get_use_host

Gets the value of the CogDirectoryFilesHandler:use-host property.

cog_directory_files_handler_set_strip_components

Sets the value of the CogDirectoryFilesHandler:strip-components property.

cog_directory_files_handler_set_use_host

Sets the value of the CogDirectoryFilesHandler:use-host property.

Methods inherited from CogRequestHandler (1)
cog_request_handler_run

Handle a single custom URI scheme request.

Properties

Cog.DirectoryFilesHandler:base-path

Base directory where to search for files to “serve” as resources.

Cog.DirectoryFilesHandler:strip-components

Number of leading path components to strip (ignore) at the beginning of request URIs.

Cog.DirectoryFilesHandler:use-host

Whether to use the URI host component as the first subdirectory name.

Class structure

struct CogDirectoryFilesHandlerClass {
  GObjectClass parent_class;
  
}
Class members
parent_class
GObjectClass
  No description available.

Functions

cog_directory_files_handler_error_quark
No description available.
cog_directory_files_handler_new

Create a new handler.