C# Class Griffin.WebServer.Files.DiskFileService

Serves files from the hard drive.
Inheritance: IFileService
Afficher le fichier Open project: jgauffin/Griffin.WebServer Class Usage Examples

Méthodes publiques

Méthode Description
DiskFileService ( string rootUri, string rootFilePath, bool substituteGzipFiles = false ) : System

Initializes a new instance of the CompositeFileService class.

GetDirectories ( Uri uri ) : IEnumerable

Gets a list of all sub directores

GetFile ( Griffin.WebServer.Files.FileContext context ) : bool

Get a file

GetFiles ( Uri uri ) : IEnumerable

Get all files that exists in the specified directory

IsDirectory ( Uri uri ) : bool

Gets if the specified url corresponds to a directory serving files

Private Methods

Méthode Description
GetDefaultFile ( ) : string
GetFullPath ( Uri uri ) : string

Method Details

DiskFileService() public méthode

Initializes a new instance of the CompositeFileService class.
public DiskFileService ( string rootUri, string rootFilePath, bool substituteGzipFiles = false ) : System
rootUri string Serve all files which are located under this URI
rootFilePath string Path to serve files from.
substituteGzipFiles bool When enabled, if a file is requested and a file with the same name + .gz exists, that version will be served instead (so long as the client supports this)
Résultat System

GetDirectories() public méthode

Gets a list of all sub directores
public GetDirectories ( Uri uri ) : IEnumerable
uri System.Uri URI (as requested by the HTTP client) which should correspond to a directory.
Résultat IEnumerable

GetFile() public méthode

Get a file
public GetFile ( Griffin.WebServer.Files.FileContext context ) : bool
context Griffin.WebServer.Files.FileContext Context used to locate and return files
Résultat bool

GetFiles() public méthode

Get all files that exists in the specified directory
public GetFiles ( Uri uri ) : IEnumerable
uri System.Uri Uri
Résultat IEnumerable

IsDirectory() public méthode

Gets if the specified url corresponds to a directory serving files
public IsDirectory ( Uri uri ) : bool
uri System.Uri Uri
Résultat bool