Summer.Batch.Common.IO.FileSystemResource Class Reference

Implementation of T:IResource for a file in the file system. More...

Inheritance diagram for Summer.Batch.Common.IO.FileSystemResource:
Summer.Batch.Common.IO.AbstractResource Summer.Batch.Common.IO.IResource

Public Member Functions

 FileSystemResource (FileInfo fileInfo)
 Constructs a new T:FileSystemResource for the given file info. More...
 
override string GetFullPath ()
 Returns the full path for this resource. More...
 
 FileSystemResource (string path)
 Constructs a new T:FileSystemResource for the given path. More...
 
override bool Exists ()
 Checks if a resource actually exists. More...
 
override Stream GetInputStream ()
 Opens a new read T:System.IO.Stream for the underlying resource. Each call is expected to return a new instance. More...
 
override Uri GetUri ()
 
Returns
a T:System.Uri for this resource

 
override FileInfo GetFileInfo ()
 
Returns
a T:System.IO.FileInfo for this resource

 
override string GetFilename ()
 Determines the filename for this resource. More...
 
override DateTime GetLastModified ()
 Determines when this resource was last modified. More...
 
override string GetDescription ()
 Computes a literal description for this resource. Implementations are encouraged to return this value for their ToString() method. More...
 
override IResource CreateRelative (string relativePath)
 Creates a new resource relative to this resource. More...
 
- Public Member Functions inherited from Summer.Batch.Common.IO.AbstractResource
override string ToString ()
 ToString override. More...
 
override bool Equals (object obj)
 Equals override. More...
 
override int GetHashCode ()
 GetHashCode override. More...
 

Detailed Description

Implementation of T:IResource for a file in the file system.

Constructor & Destructor Documentation

Summer.Batch.Common.IO.FileSystemResource.FileSystemResource ( FileInfo  fileInfo)

Constructs a new T:FileSystemResource for the given file info.

Parameters
fileInfoa file info
Summer.Batch.Common.IO.FileSystemResource.FileSystemResource ( string  path)

Constructs a new T:FileSystemResource for the given path.

Parameters
paththe path to the file to reference

Member Function Documentation

override IResource Summer.Batch.Common.IO.FileSystemResource.CreateRelative ( string  relativePath)
virtual

Creates a new resource relative to this resource.

Parameters
relativePatha path relative to this resource
Returns
a resource for the given path

Reimplemented from Summer.Batch.Common.IO.AbstractResource.

override bool Summer.Batch.Common.IO.FileSystemResource.Exists ( )
virtual

Checks if a resource actually exists.

Returns
true if the underlying resource exists, false otherwise

Implements Summer.Batch.Common.IO.AbstractResource.

override string Summer.Batch.Common.IO.FileSystemResource.GetDescription ( )
virtual

Computes a literal description for this resource. Implementations are encouraged to return this value for their ToString() method.

Returns
a string describing the resource

Implements Summer.Batch.Common.IO.AbstractResource.

override string Summer.Batch.Common.IO.FileSystemResource.GetFilename ( )
virtual

Determines the filename for this resource.

Returns
the filename for this resource, or null if it does not have one

Reimplemented from Summer.Batch.Common.IO.AbstractResource.

override string Summer.Batch.Common.IO.FileSystemResource.GetFullPath ( )
virtual

Returns the full path for this resource.

Returns

Implements Summer.Batch.Common.IO.AbstractResource.

override Stream Summer.Batch.Common.IO.FileSystemResource.GetInputStream ( )
virtual

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.IOExceptionif the stream cannot be open

Implements Summer.Batch.Common.IO.AbstractResource.

override DateTime Summer.Batch.Common.IO.FileSystemResource.GetLastModified ( )
virtual

Determines when this resource was last modified.

Returns
a T:System.DateTime for the last modification
Exceptions
T:System.IO.IOExceptionif the resource cannot be resolved

Implements Summer.Batch.Common.IO.AbstractResource.


The documentation for this class was generated from the following file:
  • Summer.Batch.Common/IO/FileSystemResource.cs