Esempio n. 1
0
        /// <summary>
        /// Determines if the directory directly contains the other directory or file.
        /// </summary>
        public static bool ContainsDirectly(this DirectoryInfo dir, FileSystemInfo other)
        {
            if (dir == null)
            {
                throw new ArgumentNullException(nameof(dir));
            }
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            return(dir.AreSame(other.GetParentDirectory()));
        }