C# Класс ScrewTurn.Wiki.FilesAndAttachments

Manages files, directories and attachments.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FindDirectoryProvider ( string fullPath ) : IFilesStorageProviderV30

Finds the provider that has a directory.

FindFileProvider ( string fullName ) : IFilesStorageProviderV30

Finds the provider that has a file.

FindPageAttachmentProvider ( System.PageInfo page, string attachmentName ) : IFilesStorageProviderV30

Finds the provider that has a page attachment.

GetFileDetails ( string fullName ) : FileDetails

Gets the details of a file.

GetPageAttachmentDetails ( System.PageInfo page, string attachmentName ) : FileDetails

Gets the details of a page attachment.

ListDirectories ( string fullPath ) : string[]

Lists the directories in a directory.

If the specified directory is the root, then the list is performed on all providers.

ListFiles ( string fullPath ) : string[]

Lists the files in a directory.

If the specified directory is the root, then the list is performed on all providers.

RetrieveFile ( string fullName, Stream output, bool countHit ) : bool

Retrieves a File.

RetrievePageAttachment ( System.PageInfo page, string attachmentName, Stream output, bool countHit ) : bool

Retrieves a Page Attachment.

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

Метод Описание
NormalizeFullName ( string fullName ) : string

Normalizes a full name.

NormalizeFullPath ( string fullPath ) : string

Normalizes a full path.

UpOneLevel ( string fullPath ) : string

Goes up one level in a directory path.

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

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

Finds the provider that has a directory.
public static FindDirectoryProvider ( string fullPath ) : IFilesStorageProviderV30
fullPath string The full path of the directory.
Результат IFilesStorageProviderV30

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

Finds the provider that has a file.
public static FindFileProvider ( string fullName ) : IFilesStorageProviderV30
fullName string The full name of the file.
Результат IFilesStorageProviderV30

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

Finds the provider that has a page attachment.
public static FindPageAttachmentProvider ( System.PageInfo page, string attachmentName ) : IFilesStorageProviderV30
page System.PageInfo The page.
attachmentName string The name of the attachment.
Результат IFilesStorageProviderV30

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

Gets the details of a file.
public static GetFileDetails ( string fullName ) : FileDetails
fullName string The full name of the file.
Результат ScrewTurn.Wiki.PluginFramework.FileDetails

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

Gets the details of a page attachment.
public static GetPageAttachmentDetails ( System.PageInfo page, string attachmentName ) : FileDetails
page System.PageInfo The page.
attachmentName string The name of the attachment.
Результат ScrewTurn.Wiki.PluginFramework.FileDetails

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

Lists the directories in a directory.
If the specified directory is the root, then the list is performed on all providers.
public static ListDirectories ( string fullPath ) : string[]
fullPath string The full path.
Результат string[]

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

Lists the files in a directory.
If the specified directory is the root, then the list is performed on all providers.
public static ListFiles ( string fullPath ) : string[]
fullPath string The full path.
Результат string[]

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

Retrieves a File.
public static RetrieveFile ( string fullName, Stream output, bool countHit ) : bool
fullName string The full name of the File.
output Stream The output stream.
countHit bool A value indicating whether or not to count this retrieval in the statistics.
Результат bool

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

Retrieves a Page Attachment.
public static RetrievePageAttachment ( System.PageInfo page, string attachmentName, Stream output, bool countHit ) : bool
page System.PageInfo The Page Info that owns the Attachment.
attachmentName string The name of the Attachment, for example "myfile.jpg".
output Stream The output stream.
countHit bool A value indicating whether or not to count this retrieval in the statistics.
Результат bool