Class FileResource
File resource implementation of IResource.
Implements
Inherited Members
Namespace: Tangosol.IO.Resources
Assembly: Coherence.dll
Syntax
public class FileResource : AbstractResource, IResource
Remarks
Supports both a System.IO.FileInfo and a System.Uri.
Constructors
FileResource(string)
Creates a FileResource class using the resource name supplied.
Declaration
public FileResource(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | The name of the file system resource. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If the supplied |
Methods
GetFileHandle(string)
Gets the System.IO.FileInfo for the specified
resourceName
.
Declaration
protected virtual FileInfo GetFileHandle(string resourceName)
Parameters
Type | Name | Description |
---|---|---|
string | resourceName | The name of the file system resource. |
Returns
Type | Description |
---|---|
FileInfo | The System.IO.FileInfo for this FileResource. |
GetStream()
Gets a stream for this IResource.
Declaration
public override Stream GetStream()
Returns
Type | Description |
---|---|
Stream | A System.IO.Stream. |
Overrides
Exceptions
Type | Condition |
---|---|
IOException | If the stream can not be opened. |
FileNotFoundException | If the file can not be found. |