THTTPFolder

From Ultibo.org
Revision as of 03:48, 10 February 2022 by Ultibo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit HTTP


Description


To be documented

Class definitions



THTTPFolder = class(THTTPDocument)

public
constructor Create;  
private
FFolder:String;  
FIndexPage:String;  
FAllowCache:Boolean;  
FAllowListing:Boolean;  
FAllowSubtree:Boolean;  
 
FHideSubfolders:Boolean;  
FForceTrailingSlash:Boolean;  
 
function GetFolder:String;  
procedure SetFolder(const AFolder:String);  
function GetIndexPage:String;  
procedure SetIndexPage(const AIndexPage:String);  
procedure SetAllowCache(AAllowCache:Boolean);  
procedure SetAllowListing(AAllowListing:Boolean);  
procedure SetAllowSubtree(AAllowSubtree:Boolean);  
 
procedure SetHideSubfolders(AHideSubfolders:Boolean);  
procedure SetForceTrailingSlash(AForceTrailingSlash:Boolean);  
protected
function DoGet(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; override;  
function DoHead(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean; override;  
 
function DoGetFile(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; const AFile:String):Boolean; virtual;  
function DoGetFolder(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; const AFolder:String):Boolean; virtual;  
public
property Folder:String read GetFolder write SetFolder;  
property IndexPage:String read GetIndexPage write SetIndexPage;  
property AllowCache:Boolean read FAllowCache write SetAllowCache;  
property AllowListing:Boolean read FAllowListing write SetAllowListing;  
property AllowSubtree:Boolean read FAllowSubtree write SetAllowSubtree;  
 
property HideSubfolders:Boolean read FHideSubfolders write SetHideSubfolders; If not AllowSubtree then don't list sub folders of the configured folder
property ForceTrailingSlash:Boolean read FForceTrailingSlash write SetForceTrailingSlash; If a folder request doesn't contain a trailing slash then redirect to add it


Function declarations



constructor THTTPFolder.Create;
Description: To be documented
Note None documented


function THTTPFolder.GetFolder:String;
Description: To be documented
Note None documented


procedure THTTPFolder.SetFolder(const AFolder:String);
Description: To be documented
Note None documented


function THTTPFolder.GetIndexPage:String;
Description: To be documented
Note None documented


procedure THTTPFolder.SetIndexPage(const AIndexPage:String);
Description: To be documented
Note None documented


procedure THTTPFolder.SetAllowCache(AAllowCache:Boolean);
Description: To be documented
Note None documented


procedure THTTPFolder.SetAllowListing(AAllowListing:Boolean);
Description: To be documented
Note None documented


procedure THTTPFolder.SetAllowSubtree(AAllowSubtree:Boolean);
Description: To be documented
Note None documented


procedure THTTPFolder.SetHideSubfolders(AHideSubfolders:Boolean);
Description: To be documented
Note None documented


procedure THTTPFolder.SetForceTrailingSlash(AForceTrailingSlash:Boolean);
Description: To be documented
Note None documented


function THTTPFolder.DoGet(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base GET Method for an HTTP Folder
Note None documented


function THTTPFolder.DoHead(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse):Boolean;
Description: Base HEAD Method for an HTTP Folder
Note None documented


function THTTPFolder.DoGetFile(AHost:THTTPHost; ARequest:THTTPServerRequest; AResponse:THTTPServerResponse; const AFile:String):Boolean;
Description: To be documented
Note Caller must ensure the file exists


function THTTPFolder.DoGetFolder(AHost:THTTPHost;ARequest:THTTPServerRequest;AResponse:THTTPServerResponse;const AFolder:String):Boolean;
Description: To be documented
Note Caller must ensure the folder exists


Return to Unit Reference