C# Класс Bloom.BloomFileLocator

Наследование: Palaso.IO.FileLocator
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
sTheMostRecentBloomFileLocator BloomFileLocator

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

Метод Описание
AddPath ( string path ) : void
BloomFileLocator ( CollectionSettings collectionSettings, XMatterPackFinder xMatterPackFinder, IEnumerable factorySearchPaths, IEnumerable userInstalledSearchPaths, IEnumerable afterXMatterSearchPaths = null ) : System.Collections.Generic
CloneAndCustomize ( IEnumerable addedSearchPaths ) : IFileLocator
GetBestLocalizableFileDistributedWithApplication ( bool existenceOfEnglishVersionIsOptional ) : string

This can be used to find the best localized file when there is only one file with the given name, and the file is part of the files distributed with Bloom (i.e., not something in a downloaded template).

GetBestLocalizedFile ( string pathToEnglishFile ) : string

If there is a file sitting next to the english one with the desired language, get that path. Otherwise, returns the English path.

GetBrowserDirectory ( ) : string
GetBrowserFile ( ) : string
GetFactoryBookTemplateDirectory ( string bookName ) : string
GetInstalledXMatterDirectory ( ) : string
GetOptionalBrandingFile ( string brandingNameOrFolderPath, string fileName ) : string

Gets a file in the specified branding folder

IsInstalledFileOrDirectory ( string filepath ) : bool

Check whether this file was installed with Bloom (and likely to be read-only on Linux or for allUsers install).

Защищенные методы

Метод Описание
GetSearchPaths ( ) : IEnumerable

These are used (as of 26 aug 2016) only by LibPalaso's FileLocator.LocateFile(). Not used by GetFileDistributedWIthApplication().

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

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

public AddPath ( string path ) : void
path string
Результат void

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

public BloomFileLocator ( CollectionSettings collectionSettings, XMatterPackFinder xMatterPackFinder, IEnumerable factorySearchPaths, IEnumerable userInstalledSearchPaths, IEnumerable afterXMatterSearchPaths = null ) : System.Collections.Generic
collectionSettings Bloom.Collection.CollectionSettings
xMatterPackFinder Bloom.Book.XMatterPackFinder
factorySearchPaths IEnumerable
userInstalledSearchPaths IEnumerable
afterXMatterSearchPaths IEnumerable
Результат System.Collections.Generic

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

public CloneAndCustomize ( IEnumerable addedSearchPaths ) : IFileLocator
addedSearchPaths IEnumerable
Результат IFileLocator

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

This can be used to find the best localized file when there is only one file with the given name, and the file is part of the files distributed with Bloom (i.e., not something in a downloaded template).
public static GetBestLocalizableFileDistributedWithApplication ( bool existenceOfEnglishVersionIsOptional ) : string
existenceOfEnglishVersionIsOptional bool
Результат string

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

If there is a file sitting next to the english one with the desired language, get that path. Otherwise, returns the English path.
public static GetBestLocalizedFile ( string pathToEnglishFile ) : string
pathToEnglishFile string
Результат string

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

public static GetBrowserDirectory ( ) : string
Результат string

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

public static GetBrowserFile ( ) : string
Результат string

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

public static GetFactoryBookTemplateDirectory ( string bookName ) : string
bookName string
Результат string

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

public static GetInstalledXMatterDirectory ( ) : string
Результат string

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

Gets a file in the specified branding folder
public static GetOptionalBrandingFile ( string brandingNameOrFolderPath, string fileName ) : string
brandingNameOrFolderPath string Normally, the branding is just a name, which we look up in the official branding folder // but unit tests can instead provide a path to the folder. ///
fileName string
Результат string

GetSearchPaths() защищенный Метод

These are used (as of 26 aug 2016) only by LibPalaso's FileLocator.LocateFile(). Not used by GetFileDistributedWIthApplication().
protected GetSearchPaths ( ) : IEnumerable
Результат IEnumerable

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

Check whether this file was installed with Bloom (and likely to be read-only on Linux or for allUsers install).
public static IsInstalledFileOrDirectory ( string filepath ) : bool
filepath string
Результат bool

Описание свойств

sTheMostRecentBloomFileLocator публичное статическое свойство

public static BloomFileLocator,Bloom sTheMostRecentBloomFileLocator
Результат BloomFileLocator