Class FilesystemResourceLoader
Simple IResourceLoader that opens resource files
from the local file system, optionally resolving against
a base directory.
This loader wraps a delegate IResourceLoader
that is used to resolve all files, the current base directory
does not contain. NewInstance<T>(String) is always resolved
against the delegate, as an System.Assembly is needed.
You can chain several FilesystemResourceLoaders
to allow lookup of files in more than one base directory.
Inheritance
System.Object
FilesystemResourceLoader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class FilesystemResourceLoader : IResourceLoader
Constructors
|
Improve this Doc
View Source
FilesystemResourceLoader()
Creates a resource loader that requires absolute filenames or relative to CWD
to resolve resources. Files not found in file system and class lookups
are delegated to context classloader.
Declaration
public FilesystemResourceLoader()
|
Improve this Doc
View Source
FilesystemResourceLoader(DirectoryInfo)
Creates a resource loader that resolves resources against the given
base directory (may be null
to refer to CWD).
Files not found in file system and class lookups are delegated to context
classloader.
Declaration
public FilesystemResourceLoader(DirectoryInfo baseDirectory)
Parameters
Type |
Name |
Description |
System.IO.DirectoryInfo |
baseDirectory |
|
|
Improve this Doc
View Source
FilesystemResourceLoader(DirectoryInfo, IResourceLoader)
Creates a resource loader that resolves resources against the given
base directory (may be null
to refer to CWD).
Files not found in file system and class lookups are delegated
to the given delegate IResourceLoader.
Declaration
public FilesystemResourceLoader(DirectoryInfo baseDirectory, IResourceLoader delegate)
Parameters
Type |
Name |
Description |
System.IO.DirectoryInfo |
baseDirectory |
|
IResourceLoader |
delegate |
|
Methods
|
Improve this Doc
View Source
FindType(String)
Declaration
public Type FindType(string cname)
Parameters
Type |
Name |
Description |
System.String |
cname |
|
Returns
Type |
Description |
System.Type |
|
|
Improve this Doc
View Source
NewInstance<T>(String)
Declaration
public T NewInstance<T>(string cname)
Parameters
Type |
Name |
Description |
System.String |
cname |
|
Returns
Type Parameters
|
Improve this Doc
View Source
OpenResource(String)
Declaration
public Stream OpenResource(string resource)
Parameters
Type |
Name |
Description |
System.String |
resource |
|
Returns
Type |
Description |
System.IO.Stream |
|
Implements