aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming/Video/FileStack.cs
blob: 2df1e9aed14697557ee156c54156480c70fdd969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;

namespace Emby.Naming.Video
{
    public class FileStack
    {
        public string Name { get; set; }
        public List<string> Files { get; set; }
        public bool IsDirectoryStack { get; set; }

        public FileStack()
        {
            Files = new List<string>();
        }

        public bool ContainsFile(string file, bool IsDirectory)
        {
            if (IsDirectoryStack == IsDirectory)
            {
                return Files.Contains(file, StringComparer.OrdinalIgnoreCase);
            }

            return false;
        }
    }
}