Interface for a resource descriptors that abstracts from the actual type of the underlying resource. More...
Public Member Functions | |
Stream | GetInputStream () |
Opens a new read T:System.IO.Stream for the underlying resource. Each call is expected to return a new instance. More... | |
bool | Exists () |
Checks if a resource actually exists. More... | |
Uri | GetUri () |
FileInfo | GetFileInfo () |
string | GetFullPath () |
returns the full path for this resource More... | |
DateTime | GetLastModified () |
Determines when this resource was last modified. More... | |
string | GetFilename () |
Determines the filename for this resource. More... | |
string | GetDescription () |
Computes a literal description for this resource. Implementations are encouraged to return this value for their ToString() method. More... | |
IResource | CreateRelative (string relativePath) |
Creates a new resource relative to this resource. More... | |
Detailed Description
Interface for a resource descriptors that abstracts from the actual type of the underlying resource.
All resource types can provide a reading T:System.IO.Stream, but T:System.URI or T:System.IO.FileInfo may not be available for some resource types.
Member Function Documentation
IResource Summer.Batch.Common.IO.IResource.CreateRelative | ( | string | relativePath | ) |
Creates a new resource relative to this resource.
- Parameters
-
relativePath a path relative to this resource
- Returns
- a resource for the given path
- Exceptions
-
T:System.IO.IOException if the relative resource cannot be determined
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
bool Summer.Batch.Common.IO.IResource.Exists | ( | ) |
Checks if a resource actually exists.
- Returns
true
if the underlying resource exists,false
otherwise
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
string Summer.Batch.Common.IO.IResource.GetDescription | ( | ) |
Computes a literal description for this resource. Implementations are encouraged to return this value for their ToString() method.
- Returns
- a string describing the resource
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
FileInfo Summer.Batch.Common.IO.IResource.GetFileInfo | ( | ) |
- Returns
- a T:System.IO.FileInfo for this resource
- Exceptions
-
T:System.IO.FileNotFoundException if the resource cannot be resolved as a file
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
string Summer.Batch.Common.IO.IResource.GetFilename | ( | ) |
Determines the filename for this resource.
- Returns
- the filename for this resource, or
null
if it does not have one
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
string Summer.Batch.Common.IO.IResource.GetFullPath | ( | ) |
returns the full path for this resource
- Returns
Implemented in Summer.Batch.Common.IO.AbstractResource, and Summer.Batch.Common.IO.FileSystemResource.
Stream Summer.Batch.Common.IO.IResource.GetInputStream | ( | ) |
Opens a new read T:System.IO.Stream for the underlying resource. Each call is expected to return a new instance.
- Returns
- a T:System.IO.Stream for reading the underlying resource (cannot be null)
- Exceptions
-
T:System.IO.IOException if the stream cannot be open
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
DateTime Summer.Batch.Common.IO.IResource.GetLastModified | ( | ) |
Determines when this resource was last modified.
- Returns
- a T:System.DateTime for the last modification
- Exceptions
-
T:System.IO.IOException if the resource cannot be resolved
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
Uri Summer.Batch.Common.IO.IResource.GetUri | ( | ) |
- Returns
- a T:System.Uri for this resource
- Exceptions
-
T:System.NotSupportedException if the resource cannot be resolved as a URI
Implemented in Summer.Batch.Common.IO.FileSystemResource, and Summer.Batch.Common.IO.AbstractResource.
The documentation for this interface was generated from the following file:
- Summer.Batch.Common/IO/IResource.cs