C# Класс BlogEngine.Core.Providers.BlogFileSystemProvider

Наследование: System.Configuration.Provider.ProviderBase
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ClearFileSystem ( ) : void

Clears a file system. This will delete all files and folders recursivly.

Handle with care... Possibly an internal method?

DeleteDirectory ( string VirtualPath ) : void

Deletes a spefic directory from a virtual path

Virtual path is the path starting from the /files/ containers The entity is queried against to current blog id

DeleteFile ( string VirtualPath ) : void

deletes a file by virtual path

DirectoryExists ( string VirtualPath ) : bool

Returns wether or not the specific directory by virtual path exists

FileExists ( string VirtualPath ) : bool

boolean wether a file exists by its virtual path

GetDirectories ( Directory BaseDirectory ) : IEnumerable

gets all the directories underneath a base directory. Only searches one level.

GetDirectory ( Directory BaseDirectory ) : Directory

gets a directory by a basedirectory and a string array of sub path tree, directory will be created if not found

GetDirectory ( Directory BaseDirectory, bool CreateNew ) : Directory

gets a directory by a basedirectory and a string array of sub path tree

GetDirectory ( string VirtualPath ) : Directory

gets a directory by the virtual path, creates the directory path if it does not exist

GetDirectory ( string VirtualPath, bool CreateNew ) : Directory

gets a directory by the virtual path, with a flag to create if not found

GetFile ( string VirtualPath ) : File

gets a specific file by virtual path

GetFiles ( Directory BaseDirectory ) : IEnumerable

gets all the files in a directory, only searches one level

ImageThumbnail ( string VirtualPath, int MaximumSize ) : Image
UploadFile ( byte FileBinary, string FileName, Directory BaseDirectory ) : File

uploads a file to the provider container

UploadFile ( byte FileBinary, string FileName, Directory BaseDirectory, bool Overwrite ) : File

uploads a file to the provider container

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

Метод Описание
CreateDirectory ( string VirtualPath ) : Directory

Creates a directory at a specific path

Virtual path is the path starting from the /files/ containers The entity is created against the current blog id

GetFileContents ( File BaseFile ) : File

gets the file contents via Lazy load, however in the DbProvider the Contents are loaded when the initial object is created to cut down on DbReads

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

ClearFileSystem() публичный абстрактный Метод

Clears a file system. This will delete all files and folders recursivly.
Handle with care... Possibly an internal method?
public abstract ClearFileSystem ( ) : void
Результат void

DeleteDirectory() публичный абстрактный Метод

Deletes a spefic directory from a virtual path
Virtual path is the path starting from the /files/ containers The entity is queried against to current blog id
public abstract DeleteDirectory ( string VirtualPath ) : void
VirtualPath string The path to delete
Результат void

DeleteFile() публичный абстрактный Метод

deletes a file by virtual path
public abstract DeleteFile ( string VirtualPath ) : void
VirtualPath string virtual path
Результат void

DirectoryExists() публичный абстрактный Метод

Returns wether or not the specific directory by virtual path exists
public abstract DirectoryExists ( string VirtualPath ) : bool
VirtualPath string The virtual path to query
Результат bool

FileExists() публичный абстрактный Метод

boolean wether a file exists by its virtual path
public abstract FileExists ( string VirtualPath ) : bool
VirtualPath string the virtual path
Результат bool

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

gets all the directories underneath a base directory. Only searches one level.
public abstract GetDirectories ( Directory BaseDirectory ) : IEnumerable
BaseDirectory Directory the base directory
Результат IEnumerable

GetDirectory() публичный абстрактный Метод

gets a directory by a basedirectory and a string array of sub path tree, directory will be created if not found
public abstract GetDirectory ( Directory BaseDirectory ) : Directory
BaseDirectory Directory the base directory object
Результат Directory

GetDirectory() публичный абстрактный Метод

gets a directory by a basedirectory and a string array of sub path tree
public abstract GetDirectory ( Directory BaseDirectory, bool CreateNew ) : Directory
BaseDirectory Directory the base directory object
CreateNew bool if set will create the directory structure
Результат Directory

GetDirectory() публичный абстрактный Метод

gets a directory by the virtual path, creates the directory path if it does not exist
public abstract GetDirectory ( string VirtualPath ) : Directory
VirtualPath string the virtual path
Результат Directory

GetDirectory() публичный абстрактный Метод

gets a directory by the virtual path, with a flag to create if not found
public abstract GetDirectory ( string VirtualPath, bool CreateNew ) : Directory
VirtualPath string The virtual path
CreateNew bool bool yes \ no to create the director.
Результат Directory

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

gets a specific file by virtual path
public abstract GetFile ( string VirtualPath ) : File
VirtualPath string the virtual path of the file
Результат File

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

gets all the files in a directory, only searches one level
public abstract GetFiles ( Directory BaseDirectory ) : IEnumerable
BaseDirectory Directory the base directory
Результат IEnumerable

ImageThumbnail() публичный абстрактный Метод

public abstract ImageThumbnail ( string VirtualPath, int MaximumSize ) : Image
VirtualPath string
MaximumSize int
Результат BlogEngine.Core.FileSystem.Image

UploadFile() публичный абстрактный Метод

uploads a file to the provider container
public abstract UploadFile ( byte FileBinary, string FileName, Directory BaseDirectory ) : File
FileBinary byte file contents as byte array
FileName string the file name
BaseDirectory Directory directory object that is the owner
Результат File

UploadFile() публичный абстрактный Метод

uploads a file to the provider container
public abstract UploadFile ( byte FileBinary, string FileName, Directory BaseDirectory, bool Overwrite ) : File
FileBinary byte the contents of the file as a byte array
FileName string the file name
BaseDirectory Directory the directory object that is the owner
Overwrite bool boolean wether to overwrite the file if it exists.
Результат File