namespace ZionFoundation.Components
{
    public class IComponent
    {
        public static IComponent Build(string path, bool monitor = true)
        {
            System.IO.FileAttributes attr = System.IO.File.GetAttributes(path);

            if ((attr & System.IO.FileAttributes.Directory) == System.IO.FileAttributes.Directory)
                return new Folder(path, monitor);
            else
                return new File(path);
        }
    }
}
