C# Класс Griffin.WebServer.Files.DiskFileService

Serves files from the hard drive.
Наследование: IFileService
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
GetDefaultFile ( ) : string
GetFullPath ( Uri uri ) : string

Описание методов

DiskFileService() публичный Метод

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)
Результат System

GetDirectories() публичный Метод

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.
Результат IEnumerable

GetFile() публичный Метод

Get a file
public GetFile ( Griffin.WebServer.Files.FileContext context ) : bool
context Griffin.WebServer.Files.FileContext Context used to locate and return files
Результат bool

GetFiles() публичный Метод

Get all files that exists in the specified directory
public GetFiles ( Uri uri ) : IEnumerable
uri System.Uri Uri
Результат IEnumerable

IsDirectory() публичный Метод

Gets if the specified url corresponds to a directory serving files
public IsDirectory ( Uri uri ) : bool
uri System.Uri Uri
Результат bool