Difference between revisions of "THTTPFolder"
From Ultibo.org
(Created page with "Return to Unit HTTP __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-collapse...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 39: | Line 39: | ||
|- | |- | ||
| <code>FAllowSubtree:Boolean;</code> | | <code>FAllowSubtree:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FHideSubfolders:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FForceTrailingSlash:Boolean;</code> | ||
| | | | ||
|- | |- | ||
Line 62: | Line 70: | ||
|- | |- | ||
| <code>procedure SetAllowSubtree(AAllowSubtree:Boolean);</code> | | <code>procedure SetAllowSubtree(AAllowSubtree:Boolean);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure SetHideSubfolders(AHideSubfolders:Boolean);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>procedure SetForceTrailingSlash(AForceTrailingSlash:Boolean);</code> | ||
| | | | ||
|- | |- | ||
Line 96: | Line 112: | ||
| <code>property AllowSubtree:Boolean read FAllowSubtree write SetAllowSubtree;</code> | | <code>property AllowSubtree:Boolean read FAllowSubtree write SetAllowSubtree;</code> | ||
| | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>property HideSubfolders:Boolean read FHideSubfolders write SetHideSubfolders;</code> | ||
+ | | If not AllowSubtree then don't list sub folders of the configured folder | ||
+ | |- | ||
+ | | <code>property ForceTrailingSlash:Boolean read FForceTrailingSlash write SetForceTrailingSlash;</code> | ||
+ | | If a folder request doesn't contain a trailing slash then redirect to add it | ||
|- | |- | ||
|} | |} | ||
Line 191: | Line 215: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">procedure THTTPFolder.SetAllowSubtree(AAllowSubtree:Boolean);</pre> | <pre style="border: 0; padding-bottom:0px;">procedure THTTPFolder.SetAllowSubtree(AAllowSubtree:Boolean);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure THTTPFolder.SetHideSubfolders(AHideSubfolders:Boolean);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure THTTPFolder.SetForceTrailingSlash(AForceTrailingSlash:Boolean);</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
Latest revision as of 03:48, 10 February 2022
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