C# 클래스 BlogEngine.Core.Providers.DbFileSystemProvider

DbBlogProvider Parial class for manageing all FileSystem methods
상속: BlogFileSystemProvider
파일 보기 프로젝트 열기: rasmuskl/ReSharperCourse

Private Properties

프로퍼티 타입 설명
CreateDirectory FileSystem.Directory
GetFileContents FileSystem.File

공개 메소드들

메소드 설명
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 ( FileSystem BaseDirectory ) : IEnumerable

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

GetDirectory ( FileSystem BaseDirectory ) : FileSystem.Directory

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

GetDirectory ( FileSystem BaseDirectory, bool CreateNew ) : FileSystem.Directory
GetDirectory ( string VirtualPath ) : FileSystem.Directory

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

GetDirectory ( string VirtualPath, bool CreateNew ) : FileSystem.Directory

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

GetFile ( string VirtualPath ) : FileSystem.File

gets a specific file by virtual path

GetFiles ( FileSystem BaseDirectory ) : IEnumerable

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

ImageThumbnail ( string VirtualPath, int MaximumSize ) : FileSystem.Image

Returns a thumbnail image at a maximum size. Only one size is provided as the thumbnail will be scaled down. If the thumbnail does not exist the thumbnail is created

this is a virtual file and all actual file methods will not be available.

Initialize ( string name, NameValueCollection config ) : void

init

UploadFile ( byte FileBinary, string FileName, FileSystem BaseDirectory ) : FileSystem.File

uploads a file to the provider container

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

uploads a file to the provider container

비공개 메소드들

메소드 설명
CreateDirectory ( string VirtualPath ) : FileSystem.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 ( FileSystem BaseFile ) : FileSystem.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 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 DeleteDirectory ( string VirtualPath ) : void
VirtualPath string The path to delete
리턴 void

DeleteFile() 공개 메소드

deletes a file by virtual path
public DeleteFile ( string VirtualPath ) : void
VirtualPath string virtual path
리턴 void

DirectoryExists() 공개 메소드

Returns wether or not the specific directory by virtual path exists
public DirectoryExists ( string VirtualPath ) : bool
VirtualPath string The virtual path to query
리턴 bool

FileExists() 공개 메소드

boolean wether a file exists by its virtual path
public FileExists ( string VirtualPath ) : bool
VirtualPath string the virtual path
리턴 bool

GetDirectories() 공개 메소드

gets all the directories underneath a base directory. Only searches one level.
public GetDirectories ( FileSystem BaseDirectory ) : IEnumerable
BaseDirectory FileSystem the base directory
리턴 IEnumerable

GetDirectory() 공개 메소드

gets a directory by a basedirectory and a string array of sub path tree
public GetDirectory ( FileSystem BaseDirectory ) : FileSystem.Directory
BaseDirectory FileSystem the base directory object
리턴 FileSystem.Directory

GetDirectory() 공개 메소드

public GetDirectory ( FileSystem BaseDirectory, bool CreateNew ) : FileSystem.Directory
BaseDirectory FileSystem
CreateNew bool
리턴 FileSystem.Directory

GetDirectory() 공개 메소드

gets a directory by the virtual path, creates the directory path if it does not exist
public GetDirectory ( string VirtualPath ) : FileSystem.Directory
VirtualPath string the virtual path
리턴 FileSystem.Directory

GetDirectory() 공개 메소드

gets a directory by the virtual path, with a flag to create if not found
public GetDirectory ( string VirtualPath, bool CreateNew ) : FileSystem.Directory
VirtualPath string The virtual path
CreateNew bool bool yes \ no to create the director.
리턴 FileSystem.Directory

GetFile() 공개 메소드

gets a specific file by virtual path
public GetFile ( string VirtualPath ) : FileSystem.File
VirtualPath string the virtual path of the file
리턴 FileSystem.File

GetFiles() 공개 메소드

gets all the files in a directory, only searches one level
public GetFiles ( FileSystem BaseDirectory ) : IEnumerable
BaseDirectory FileSystem the base directory
리턴 IEnumerable

ImageThumbnail() 공개 메소드

Returns a thumbnail image at a maximum size. Only one size is provided as the thumbnail will be scaled down. If the thumbnail does not exist the thumbnail is created
this is a virtual file and all actual file methods will not be available.
public ImageThumbnail ( string VirtualPath, int MaximumSize ) : FileSystem.Image
VirtualPath string The virtual path of the image
MaximumSize int The maximum size for the image
리턴 FileSystem.Image

Initialize() 공개 메소드

init
public Initialize ( string name, NameValueCollection config ) : void
name string
config System.Collections.Specialized.NameValueCollection
리턴 void

UploadFile() 공개 메소드

uploads a file to the provider container
public UploadFile ( byte FileBinary, string FileName, FileSystem BaseDirectory ) : FileSystem.File
FileBinary byte file contents as byte array
FileName string the file name
BaseDirectory FileSystem directory object that is the owner
리턴 FileSystem.File

UploadFile() 공개 메소드

uploads a file to the provider container
public UploadFile ( byte FileBinary, string FileName, FileSystem BaseDirectory, bool Overwrite ) : FileSystem.File
FileBinary byte the contents of the file as a byte array
FileName string the file name
BaseDirectory FileSystem the directory object that is the owner
Overwrite bool boolean wether to overwrite the file if it exists.
리턴 FileSystem.File