2017-04-02 00:36:06 +00:00
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace SharpCifs.Util.Sharpen
|
|
|
|
{
|
|
|
|
public class FileInputStream : InputStream
|
2017-07-08 03:12:21 +00:00
|
|
|
{
|
|
|
|
public FileInputStream (FilePath file) : this(file.GetPath ())
|
|
|
|
{
|
|
|
|
}
|
2017-04-02 00:36:06 +00:00
|
|
|
|
2017-07-08 03:12:21 +00:00
|
|
|
public FileInputStream (string file)
|
|
|
|
{
|
|
|
|
if (!File.Exists (file)) {
|
|
|
|
throw new FileNotFoundException ("File not found", file);
|
|
|
|
}
|
|
|
|
Wrapped = new FileStream (file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2017-04-02 00:36:06 +00:00
|
|
|
}
|