using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.IO;
using System.Numerics;
using System.ComponentModel.DataAnnotations.Schema;

using Model.Entities.Base;
using Model.Entities.Users;

namespace Model.Entities.Files.FS_Entities
{
    //[NotMapped]
    public class SDirectory : FS_Item
    {

        public override bool IsDirectory => true;



        [NotMapped]
        private DirectoryInfo _Info;
        public DirectoryInfo Info
        {
            get
            {
                if (_Info == null)
                    _Info = new DirectoryInfo(PhysicalPath);
                return _Info; }
        }

        [Obsolete]
        public SDirectory() { }

        public SDirectory(SDirectory parent, string Name, User user) : base(Enum_BaseDirectoryEntity.Directory, parent, Name, user) { }

        /// <summary>
        /// For SRootDirectory
        /// </summary>
        /// <param name="type"></param>
        /// <param name="parent"></param>
        /// <param name="Name"></param>
        protected SDirectory(Enum_BaseDirectoryEntity type, SDirectory parent, string Name) : base(type, parent, Name, null) { }
    }
}
