AgateLib.Utility.FileProviderList Class Reference

Contains a list of IFileProvider objects that are used to search for and open files. More...

Inheritance diagram for AgateLib.Utility.FileProviderList:

AgateLib.IFileProvider

List of all members.

Public Member Functions

IFileProvider GetProvider (string filename)
 Returns the IFileProvider object which would return the specified file when OpenRead is called. Throws a FileNotFoundException if the file is not available.
Stream OpenRead (string filename)
 Opens a specified file by searching backwards through the list of providers until a matching filename is found. A FileNotFoundException is thrown if the file does not exist.
IEnumerable< string > GetAllFiles (string filter)
 Returns all filenames matching the specified filter in all file providers.
IEnumerable< string > GetAllFiles ()
 Returns all filenames in all file providers.
bool FileExists (string filename)
 Returns true if the specified file exists in a file provider.
void AddPath (string path)
 Adds a path in the filesystem to the list of locations to search when opening a file.
int IndexOf (IFileProvider item)
 Returns the index of the specified IFileProvider.
void Insert (int index, IFileProvider item)
 Insers an IFileProvider into the list.
void RemoveAt (int index)
 Removes an IFileProvider from the list.
void Add (IFileProvider item)
 Adds an IFileProvider to the list.
void Clear ()
 Clears the list.
bool Contains (IFileProvider item)
 Returns true if the list contains the specified IFileProvider.
bool Remove (IFileProvider item)
 Removes an IFileProvider from the list.
IEnumerator< IFileProviderGetEnumerator ()
 Enumerates items.

Properties

IFileProvider this [int index] [get, set]
 Gets or sets the IFileProvider at the specified location.
int Count [get]
 Gets the number of items in the list.
bool IsReadOnly [get]
 Always returns false.


Detailed Description

Contains a list of IFileProvider objects that are used to search for and open files.


Member Function Documentation

void AgateLib.Utility.FileProviderList.Add ( IFileProvider  item  ) 

Adds an IFileProvider to the list.

Parameters:
item 

void AgateLib.Utility.FileProviderList.AddPath ( string  path  ) 

Adds a path in the filesystem to the list of locations to search when opening a file.

Parameters:
path 

void AgateLib.Utility.FileProviderList.Clear (  ) 

Clears the list.

bool AgateLib.Utility.FileProviderList.Contains ( IFileProvider  item  ) 

Returns true if the list contains the specified IFileProvider.

Parameters:
item 
Returns:

bool AgateLib.Utility.FileProviderList.FileExists ( string  filename  ) 

Returns true if the specified file exists in a file provider.

Parameters:
filename 
Returns:

Implements AgateLib.IFileProvider.

IEnumerable<string> AgateLib.Utility.FileProviderList.GetAllFiles (  ) 

Returns all filenames in all file providers.

Returns:

Implements AgateLib.IFileProvider.

IEnumerable<string> AgateLib.Utility.FileProviderList.GetAllFiles ( string  filter  ) 

Returns all filenames matching the specified filter in all file providers.

Parameters:
filter 
Returns:

Implements AgateLib.IFileProvider.

IEnumerator<IFileProvider> AgateLib.Utility.FileProviderList.GetEnumerator (  ) 

Enumerates items.

Returns:

IFileProvider AgateLib.Utility.FileProviderList.GetProvider ( string  filename  ) 

Returns the IFileProvider object which would return the specified file when OpenRead is called. Throws a FileNotFoundException if the file is not available.

Parameters:
filename 
Returns:

int AgateLib.Utility.FileProviderList.IndexOf ( IFileProvider  item  ) 

Returns the index of the specified IFileProvider.

Parameters:
item 
Returns:

void AgateLib.Utility.FileProviderList.Insert ( int  index,
IFileProvider  item 
)

Insers an IFileProvider into the list.

Parameters:
index 
item 

Stream AgateLib.Utility.FileProviderList.OpenRead ( string  filename  ) 

Opens a specified file by searching backwards through the list of providers until a matching filename is found. A FileNotFoundException is thrown if the file does not exist.

Parameters:
filename The filename to search for.
Returns:

Implements AgateLib.IFileProvider.

bool AgateLib.Utility.FileProviderList.Remove ( IFileProvider  item  ) 

Removes an IFileProvider from the list.

Parameters:
item 
Returns:

void AgateLib.Utility.FileProviderList.RemoveAt ( int  index  ) 

Removes an IFileProvider from the list.

Parameters:
index 


Property Documentation

int AgateLib.Utility.FileProviderList.Count [get]

Gets the number of items in the list.

bool AgateLib.Utility.FileProviderList.IsReadOnly [get]

Always returns false.

IFileProvider AgateLib.Utility.FileProviderList.this[int index] [get, set]

Gets or sets the IFileProvider at the specified location.

Parameters:
index 
Returns:


The documentation for this class was generated from the following file:
AgateLib
Awesome Game and Tool Engine Library
SourceForge.net Logo