aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/IO/SharpCifs/Util/Sharpen/FileInputStream.cs
blob: 6cebfcb9451e8b9edc45e252e1a3332668e939af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
        }
    }
}