C# Class Pretzel.FileContentProvider

Inheritance: IWebContent
Show file Open project: Code52/pretzel

Public Methods

Method Description
GetBinaryContent ( string request ) : byte[]

Read file

GetContent ( string request ) : string

Read file

IsAvailable ( string request ) : bool

Check if file is found

IsDirectory ( string request ) : bool

Checks if request points to a directory

SetBasePath ( string path ) : void

Set a base path to work from

Private Methods

Method Description
GetFullPath ( string request ) : string

Combines and unescapes the path for the request

GetRequestedPage ( string request ) : string

Get the path for the page to send to the user

Method Details

GetBinaryContent() public method

Read file
public GetBinaryContent ( string request ) : byte[]
request string Request string
return byte[]

GetContent() public method

Read file
public GetContent ( string request ) : string
request string Request string
return string

IsAvailable() public method

Check if file is found
public IsAvailable ( string request ) : bool
request string Request string
return bool

IsDirectory() public method

Checks if request points to a directory
public IsDirectory ( string request ) : bool
request string
return bool

SetBasePath() public method

Set a base path to work from
public SetBasePath ( string path ) : void
path string Base path
return void