C# Class FileLauncher.FileLocator

Inheritance: IFileLocator
显示文件 Open project: Invenietis/ck-certified

Public Methods

Method Description
CreateWildFile ( string path, bool fromRegistry ) : IWildFile
FileLocator ( ) : System
GetLocationCommand ( IWildFile file ) : string
GetSpecialFolder ( string path ) : Environment.SpecialFolder?

Get the SpecialFolder from the given path

Init ( ) : void

Load resources

LoadRegistry ( ) : void

Load all the WildFile from the registry into RegistryApps

LoadSpecialFolders ( ) : void

Load the special folders path

TryLocate ( IWildFile file, Action callback ) : void

Private Methods

Method Description
LocateFromRegistry ( WildFile file ) : void
LocateFromSpecialDirectory ( WildFile file ) : void
LocateWebsite ( WildFile wFile ) : void
TryLocatePath ( string path, string folders = null, List exclude = null ) : string

Try to locate a not found file path : First, we look into the current directory and test if the file exist in a direct sub directory. Then if the file can't be found, we search a folder in sub directories listed in folders. If there is no match, we get the parent folder. if there is a match, we get in the sub directory and so on.

Method Details

CreateWildFile() public method

public CreateWildFile ( string path, bool fromRegistry ) : IWildFile
path string
fromRegistry bool
return IWildFile

FileLocator() public method

public FileLocator ( ) : System
return System

GetLocationCommand() public method

public GetLocationCommand ( IWildFile file ) : string
file IWildFile
return string

GetSpecialFolder() public static method

Get the SpecialFolder from the given path
public static GetSpecialFolder ( string path ) : Environment.SpecialFolder?
path string
return Environment.SpecialFolder?

Init() public method

Load resources
public Init ( ) : void
return void

LoadRegistry() public method

Load all the WildFile from the registry into RegistryApps
public LoadRegistry ( ) : void
return void

LoadSpecialFolders() public static method

Load the special folders path
public static LoadSpecialFolders ( ) : void
return void

TryLocate() public method

public TryLocate ( IWildFile file, Action callback ) : void
file IWildFile
callback Action
return void