C# 클래스 Bloom.BloomFileLocator

상속: Palaso.IO.FileLocator
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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