You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
502 B
21 lines
502 B
using System.IO;
|
|
|
|
namespace SharpCifs.Util.Sharpen
|
|
{
|
|
public class FileInputStream : InputStream
|
|
{
|
|
public FileInputStream(FilePath file) : this(file.GetPath())
|
|
{
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|